Skip to contentSkip to conversation

usb: gadget: musb: Fix the DMA transfer error for Isochronous transfers

PATCH [email protected] 1 participant 1 message Apr 20, 2022 1 message not in the archive USB

lore
Share & tools
lore

[email protected]

author Reviewed-by
#1 lore raw
In reply to a message not in the archive

Hello Haifeng,

Quoted 5 lines · Haifeng

For Isochronous transfer mode, the ISO bit should be kept in CSR. Otherwise, the DMA transfer will be terminated unexpected since the ISO bit is missed once the last packet is a short packet.

Looks good to me.

Quoted 20 lines
---
 drivers/usb/musb/musb_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/musb_gadget.c +1 -1
index 51274b87f46c..b99faf627dce 100644
@@ -482,7 +482,7 @@ void musb_g_tx(struct musb *musb, u8 epnum)
 			if (csr & MUSB_TXCSR_TXPKTRDY)
 				return;
 
-			musb_writew(epio, MUSB_TXCSR, MUSB_TXCSR_MODE
+			musb_writew(epio, MUSB_TXCSR, csr | MUSB_TXCSR_MODE
 					| MUSB_TXCSR_TXPKTRDY);
 			request->zero = 0;
 		}
Signature · 1 line
2.17.1