diff options
author | Felipe Balbi <balbi@ti.com> | 2012-03-21 11:44:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 10:16:53 -0700 |
commit | 36de412a4eb52d3558b946f7055e83c19c31b1ba (patch) | |
tree | 6f0518ffb882845a686c92965e8cbc6d539574fd /drivers | |
parent | 9bfc5bfd121734e0a620f63b66eda5e000562950 (diff) |
usb: dwc3: ep0: increment "actual" on bounced ep0 case
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 c8df1dd967ef..45ffddb41fc8 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -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 */ |