diff options
author | Felipe Balbi <balbi@ti.com> | 2012-03-21 05:44:00 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-10 05:21:44 -0400 |
commit | cd423dd3634a5232a3019eb372b144619a61cd16 (patch) | |
tree | 88090e1f09769c38c875d037cccbfb99fa92d0de | |
parent | 566ccdda07dc5898272b6fbad9c616fc44be305a (diff) |
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: stable@vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
-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 a40d3bb0f1c2..da43131be0e7 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, | |||
569 | dwc->ep0_bounced = false; | 569 | dwc->ep0_bounced = false; |
570 | } else { | 570 | } else { |
571 | transferred = ur->length - length; | 571 | transferred = ur->length - length; |
572 | ur->actual += transferred; | ||
573 | } | 572 | } |
574 | 573 | ||
574 | ur->actual += transferred; | ||
575 | |||
575 | if ((epnum & 1) && ur->actual < ur->length) { | 576 | if ((epnum & 1) && ur->actual < ur->length) { |
576 | /* for some reason we did not get everything out */ | 577 | /* for some reason we did not get everything out */ |
577 | 578 | ||