• Bin Liu's avatar
    dmaengine: cppi41: delete channel from pending list when stop channel · 59861547
    Bin Liu authored
    The driver defines three states for a cppi channel.
    - idle: .chan_busy == 0 && not in .pending list
    - pending: .chan_busy == 0 && in .pending list
    - busy: .chan_busy == 1 && not in .pending list
    
    There are cases in which the cppi channel could be in the pending state
    when cppi41_dma_issue_pending() is called after cppi41_runtime_suspend()
    is called.
    
    cppi41_stop_chan() has a bug for these cases to set channels to idle state.
    It only checks the .chan_busy flag, but not the .pending list, then later
    when cppi41_runtime_resume() is called the channels in .pending list will
    be transitioned to busy state.
    
    Removing channels from the .pending list solves the problem.
    
    Fixes: 975faaeb ("dma: cppi41: start tear down only if channel is busy")
    Cc: stable@vger.kernel.org # v3.15+
    Signed-off-by: default avatarBin Liu <b-liu@ti.com>
    Reviewed-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: Vinod Koul's avatarVinod Koul <vkoul@kernel.org>
    59861547
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
cppi41.c Loading commit data...
dma-crossbar.c Loading commit data...
edma.c Loading commit data...
omap-dma.c Loading commit data...