commit: cd423dd3634a5232a3019eb372b144619a61cd16
From: Felipe Balbi <[email protected]>
Date: Wed, 21 Mar 2012 11:44:00 +0200
Subject: usb: dwc3: ep0: increment "actual" on bounced ep0 case

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.

Cc: [email protected]
Signed-off-by: Felipe Balbi <[email protected]>
---
 drivers/usb/dwc3/ep0.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index a40d3bb..da43131 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -569,9 +569,10 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
                dwc->ep0_bounced = false;
        } else {
                transferred = ur->length - length;
-               ur->actual += transferred;
        }
 
+       ur->actual += transferred;
+
        if ((epnum & 1) && ur->actual < ur->length) {
                /* for some reason we did not get everything out */
 
-- 
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to