From 593bc4622a98c172dbb939103aef917d1800a663 Mon Sep 17 00:00:00 2001 From: Alexandre Bailon Date: Sun, 16 Apr 2017 23:21:18 -0500 Subject: usb: musb: musb_cppi41: Workaround DMA stall issue during teardown The DMA may hang up if a teardown is initiated while an endpoint is still active (Advisory 2.3.27 of DA8xx errata). To workaround this issue, add a delay before to initiate the teardown. Signed-off-by: Alexandre Bailon Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_cppi41.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/usb/musb/musb_cppi41.c') diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c index 355655f8a3fb..e7c8b1b8bf22 100644 --- a/drivers/usb/musb/musb_cppi41.c +++ b/drivers/usb/musb/musb_cppi41.c @@ -571,6 +571,10 @@ static int cppi41_dma_channel_abort(struct dma_channel *channel) } } + /* DA8xx Advisory 2.3.27: wait 250 ms before to start the teardown */ + if (musb->io.quirks & MUSB_DA8XX) + mdelay(250); + tdbit = 1 << cppi41_channel->port_num; if (is_tx) tdbit <<= 16; -- cgit v1.2.3