Commit 60f2951e authored by Vinod Koul's avatar Vinod Koul

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: default avatarJavier Martin <javier.martin@vista-silicon.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent dd775ae2
...@@ -571,11 +571,14 @@ static void imxdma_tasklet(unsigned long data) ...@@ -571,11 +571,14 @@ static void imxdma_tasklet(unsigned long data)
if (desc->desc.callback) if (desc->desc.callback)
desc->desc.callback(desc->desc.callback_param); desc->desc.callback(desc->desc.callback_param);
dma_cookie_complete(&desc->desc); /* If we are dealing with a cyclic descriptor keep it on ld_active
* and dont mark the descripor as complete.
/* If we are dealing with a cyclic descriptor keep it on ld_active */ * Only in non-cyclic cases it would be marked as complete
*/
if (imxdma_chan_is_doing_cyclic(imxdmac)) if (imxdma_chan_is_doing_cyclic(imxdmac))
goto out; goto out;
else
dma_cookie_complete(&desc->desc);
/* Free 2D slot if it was an interleaved transfer */ /* Free 2D slot if it was an interleaved transfer */
if (imxdmac->enabled_2d) { if (imxdmac->enabled_2d) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment