]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: omap-dma: Fix polled channel completion detection and handling
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 5 Apr 2016 12:20:20 +0000 (15:20 +0300)
committerVinod Koul <vinod.koul@intel.com>
Tue, 5 Apr 2016 16:09:42 +0000 (09:09 -0700)
commitef662c305791f431dac6579f7406402e912a3e59
treeaeda7249f373886568493bf2a5d826d83d8854de
parent3039f62d3fccb077513a4ffae4d1ef4609c1b724
dmaengine: omap-dma: Fix polled channel completion detection and handling

When based on the CCR_ENABLE bit the channel is stopped we should not call
omap_dma_callback(), only change the return value to DMA_COMPLETE. Client
drivers will do the right thing to clean up the channel after the transfer
has been completed.
Check the CCR_ENABLE only if the channel is running and not paused since
pause in sDMA means that the channel is stopped.
This will fix one hard to reproduce race condition when the channel is
terminated during transfer (affecting cyclic operation).

Fixes: 41ebfbe4d9b3 ("dmaengine: omap-dma: Handle cases when the channel is polled for completion")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/omap-dma.c