Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299404
b: refs/heads/master
c: 566ccdd
h: refs/heads/master
v: v3
  • Loading branch information
Moiz Sonasath authored and Felipe Balbi committed Apr 10, 2012
1 parent 44a7839 commit cc53771
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d258a4c42089229b855fd706622029decf316d6
refs/heads/master: 566ccdda07dc5898272b6fbad9c616fc44be305a
6 changes: 5 additions & 1 deletion trunk/drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,12 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,
length = trb->size & DWC3_TRB_SIZE_MASK;

if (dwc->ep0_bounced) {
unsigned transfer_size = ur->length;
unsigned maxp = ep0->endpoint.maxpacket;

transfer_size += (maxp - (transfer_size % maxp));
transferred = min_t(u32, ur->length,
ep0->endpoint.maxpacket - length);
transfer_size - length);
memcpy(ur->buf, dwc->ep0_bounce, transferred);
dwc->ep0_bounced = false;
} else {
Expand Down

0 comments on commit cc53771

Please sign in to comment.