Thread (193 messages) 193 messages, 8 authors, 2012-05-12

[ 059/167] [PATCH] usb: dwc3: ep0: increment "actual" on bounced ep0 case

From: Ben Hutchings <hidden>
Date: 2012-05-09 05:53:59
Also in: lkml

3.2-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Felipe Balbi <redacted>

commit cd423dd3634a5232a3019eb372b144619a61cd16 upstream.

due to a HW limitation we have a bounce buffer for ep0
out transfers which are not aligned with MaxPacketSize.

On such case we were not increment r->actual as we should.

This patch fixes that mistake.

Signed-off-by: Felipe Balbi <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <redacted>
---
 drivers/usb/dwc3/ep0.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -583,9 +583,10 @@ static void dwc3_ep0_complete_data(struc
 		dwc->ep0_bounced = false;
 	} else {
 		transferred = ur->length - trb.length;
-		ur->actual += transferred;
 	}
 
+	ur->actual += transferred;
+
 	if ((epnum & 1) && ur->actual < ur->length) {
 		/* for some reason we did not get everything out */
 

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help