Skip to content

Commit 4c2ba0c

Browse files
cristibirsanfelipebalbi
authored andcommitted
usb: musb: fix DMA for host mode
Commit ac33cdb ("usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part5") introduces a problem setting DMA host mode. The musb_advance_schedule() is called immediately after receiving an endpoint RX interrupt without waiting for the DMA transfer to complete. As a consequence when the dma complete interrupt arrives the in_qh member of hw_ep is already null an the musb_host_rx() exits on !urb error case. Fix the done condition that advances the musb schedule. Signed-off-by: Cristian Birsan <[email protected]> Signed-off-by: Joshua Henderson <[email protected]> Tested-by: Ladislav Michl <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 8de4b3a commit 4c2ba0c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/usb/musb/musb_host.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,10 +2003,8 @@ void musb_host_rx(struct musb *musb, u8 epnum)
20032003
qh->offset,
20042004
urb->transfer_buffer_length);
20052005

2006-
done = musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh,
2007-
urb, xfer_len,
2008-
iso_err);
2009-
if (done)
2006+
if (musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh, urb,
2007+
xfer_len, iso_err))
20102008
goto finish;
20112009
else
20122010
dev_err(musb->controller, "error: rx_dma failed\n");

0 commit comments

Comments
 (0)