diff mbox

[1/2] USB: musb-gadget: fix bulk IN infinite hangs in double buffer case

Message ID 201008271627.08137.vapier@gentoo.org (mailing list archive)
State New, archived
Delegated to: Felipe Balbi
Headers show

Commit Message

Mike Frysinger Aug. 27, 2010, 8:27 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6fca870..f019843 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -500,6 +500,8 @@  void musb_g_tx(struct musb *musb, u8 epnum)
 						| MUSB_TXCSR_TXPKTRDY);
 				request->zero = 0;
 			}
+			if (request->actual < request->length)
+				return;
 
 			/* ... or if not, then complete it. */
 			musb_g_giveback(musb_ep, request, 0);