dmaengine: pl330: dont complete descriptor for cyclic dma
authorTushar Behera <tushar.behera@linaro.org>
Wed, 23 May 2012 11:17:31 +0000 (16:47 +0530)
committerVinod Koul <vinod.koul@linux.intel.com>
Thu, 7 Jun 2012 08:12:58 +0000 (13:42 +0530)
Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
cyclic dma") wrongly completes descriptor for cyclic dma, hence following
BUG_ON is still hit with cyclic DMA operations.

kernel BUG at drivers/dma/dmaengine.h:53!

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
drivers/dma/pl330.c

index cbcc28e79be6331570af5ccd3132e12efe67aebc..6d550421da7a4c0a8bcf5357ec1776a9eb7564e9 100644 (file)
@@ -2321,7 +2321,7 @@ static void pl330_tasklet(unsigned long data)
        /* Pick up ripe tomatoes */
        list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
                if (desc->status == DONE) {
-                       if (pch->cyclic)
+                       if (!pch->cyclic)
                                dma_cookie_complete(&desc->txd);
                        list_move_tail(&desc->node, &list);
                }