dmaengine: pl330: dont complete descriptor for cyclic dma
authorVinod Koul <vinod.koul@linux.intel.com>
Fri, 11 May 2012 05:54:41 +0000 (11:24 +0530)
committerVinod Koul <vinod.koul@linux.intel.com>
Fri, 11 May 2012 05:54:41 +0000 (11:24 +0530)
the cookie updates completed the cyclic dma descriptor wrongly. This caused the
BUG_ON to be hit as submit is called for completed descriptor

Fix this by not marking the cyclic descriptor as complete

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Tested-by: Thomas Abraham <thomas.abraham@linaro.org>
drivers/dma/pl330.c

index 2ee6e23930ad3258e89bef7513e2c3158b7fe06f..fa3fb21e60bed6bb112dadf869ac6adc6e19dec9 100644 (file)
@@ -2322,7 +2322,8 @@ 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) {
-                       dma_cookie_complete(&desc->txd);
+                       if (pch->cyclic)
+                               dma_cookie_complete(&desc->txd);
                        list_move_tail(&desc->node, &list);
                }