From: George Cherian Date: Thu, 27 Feb 2014 05:14:41 +0000 (+0530) Subject: usb: musb: musb_cppi41: Dont reprogram DMA if tear down is initiated X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f967d104b661c25a9a396e42a1f8ebe3431adc23;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git usb: musb: musb_cppi41: Dont reprogram DMA if tear down is initiated Reprogramming the DMA after tear down is initiated leads to warning. This is mainly seen with ISOCH since we do a delayed completion for ISOCH transfers. In ISOCH transfers dma_completion should not reprogram if the channel tear down is initiated. Signed-off-by: George Cherian Signed-off-by: Vinod Koul --- diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index f88929609bac..c0c6281e3496 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -119,7 +119,8 @@ static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel) struct musb_hw_ep *hw_ep = cppi41_channel->hw_ep; struct musb *musb = hw_ep->musb; - if (!cppi41_channel->prog_len) { + if (!cppi41_channel->prog_len || + (cppi41_channel->channel.status == MUSB_DMA_STATUS_FREE)) { /* done, complete */ cppi41_channel->channel.actual_len =