From: Bin Liu Date: Mon, 24 Aug 2015 20:28:37 +0000 (-0500) Subject: usb: musb: fix cppi channel teardown for isoch transfer X-Git-Tag: v4.3-rc3~8^2~11^2~1 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=b431ba8803666e56c1d178a421b3cbc36e8d3d33;p=cascardo%2Flinux.git usb: musb: fix cppi channel teardown for isoch transfer After a few iterations of start/stop UVC camera streaming, the streaming stops. This patch adds 250us delay in the cppi channel abort path to let cppi drain properly. Using 50us delay seems to be too aggressive, some webcams are still broken. 250us is the original value used in TI 3.2 kernel. Signed-off-by: Bin Liu Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index d07cafb7d5f5..e499b862a946 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -551,6 +551,9 @@ static int cppi41_dma_channel_abort(struct dma_channel *channel) } else { cppi41_set_autoreq_mode(cppi41_channel, EP_MODE_AUTOREQ_NONE); + /* delay to drain to cppi dma pipeline for isoch */ + udelay(250); + csr = musb_readw(epio, MUSB_RXCSR); csr &= ~(MUSB_RXCSR_H_REQPKT | MUSB_RXCSR_DMAENAB); musb_writew(epio, MUSB_RXCSR, csr);