• Peter Ujfalusi's avatar
    dmaengine: omap-dma: Fix polled channel completion detection and handling · 689d3c5e
    Peter Ujfalusi authored
    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: 1a7cf7b2 ("dmaengine: omap-dma: Handle cases when the channel is polled for completion")
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
    689d3c5e
omap-dma.c 30 KB