usb: musb: musb_cppi41: Dont reprogram DMA if tear down is initiated
authorGeorge Cherian <george.cherian@ti.com>
Thu, 27 Feb 2014 05:14:41 +0000 (10:44 +0530)
committerFelipe Balbi <balbi@ti.com>
Wed, 5 Mar 2014 20:40:05 +0000 (14:40 -0600)
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 <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_cppi41.c

index 5b0f2a58f8ce3cbf7b248a82ffb61229d6b2b8fb..7b8bbf53127e114c5615fa7c90ae75a0485f6779 100644 (file)
@@ -132,7 +132,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 =