]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: dwc3: ep0: increment "actual" on bounced ep0 case
authorFelipe Balbi <balbi@ti.com>
Wed, 21 Mar 2012 09:44:00 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:16:53 +0000 (10:16 -0700)
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 <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/ep0.c

index c8df1dd967efe3e5160fbe8507a8b2bbff972aa5..45ffddb41fc8e523335a5b546bd23b27ca0817fd 100644 (file)
@@ -583,9 +583,10 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
                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 */