diff mbox

USB: musb: respect usb_request->zero in control requests

Message ID 1257876294-25296-1-git-send-email-dg@emlix.com (mailing list archive)
State Awaiting Upstream
Headers show

Commit Message

Daniel Glöckner Nov. 10, 2009, 6:04 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c
index 7a67786..522efb3 100644
--- a/drivers/usb/musb/musb_gadget_ep0.c
+++ b/drivers/usb/musb/musb_gadget_ep0.c
@@ -511,7 +511,8 @@  static void ep0_txstate(struct musb *musb)
 
 	/* update the flags */
 	if (fifo_count < MUSB_MAX_END0_PACKET
-			|| request->actual == request->length) {
+			|| (request->actual == request->length
+				&& !request->zero)) {
 		musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT;
 		csr |= MUSB_CSR0_P_DATAEND;
 	} else