Skip to content

Commit

Permalink
usb: dwc3: ep0: increment "actual" on bounced ep0 case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi committed Apr 10, 2012
1 parent 566ccdd commit cd423dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down

0 comments on commit cd423dd

Please sign in to comment.