diff options
author | Vinod Koul <vinod.koul@linux.intel.com> | 2012-04-20 05:58:07 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-04-20 05:58:07 -0400 |
commit | 60f2951e3ad9b833bc12e2ea7652be2611771792 (patch) | |
tree | b7ac7796aca149e09e8b39b5ddc9ce208c17c118 /drivers | |
parent | dd775ae2549217d3ae09363e3edb305d0fa19928 (diff) |
dmaengine: imx-dma: dont complete descriptor for cyclic dma
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
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/imx-dma.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index a45b5d2a5987..bb787d8e1529 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c | |||
@@ -571,11 +571,14 @@ static void imxdma_tasklet(unsigned long data) | |||
571 | if (desc->desc.callback) | 571 | if (desc->desc.callback) |
572 | desc->desc.callback(desc->desc.callback_param); | 572 | desc->desc.callback(desc->desc.callback_param); |
573 | 573 | ||
574 | dma_cookie_complete(&desc->desc); | 574 | /* If we are dealing with a cyclic descriptor keep it on ld_active |
575 | 575 | * and dont mark the descripor as complete. | |
576 | /* If we are dealing with a cyclic descriptor keep it on ld_active */ | 576 | * Only in non-cyclic cases it would be marked as complete |
577 | */ | ||
577 | if (imxdma_chan_is_doing_cyclic(imxdmac)) | 578 | if (imxdma_chan_is_doing_cyclic(imxdmac)) |
578 | goto out; | 579 | goto out; |
580 | else | ||
581 | dma_cookie_complete(&desc->desc); | ||
579 | 582 | ||
580 | /* Free 2D slot if it was an interleaved transfer */ | 583 | /* Free 2D slot if it was an interleaved transfer */ |
581 | if (imxdmac->enabled_2d) { | 584 | if (imxdmac->enabled_2d) { |