Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208054
b: refs/heads/master
c: 03e10e5
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 156a080 commit cbaaeaf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10aebc772a10c95e30dff0779cb0f879b8f1554f
refs/heads/master: 03e10e5ab5ba6511ddaf80085cf08c62e9336fa5
11 changes: 11 additions & 0 deletions trunk/drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,17 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
if (can_write > 512)
can_write = 512;

/* limit the write to one max-packet size worth of data, but allow
* the transfer to return that it did not run out of fifo space
* doing it. */
if (to_write > hs_ep->ep.maxpacket) {
to_write = hs_ep->ep.maxpacket;

s3c_hsotg_en_gsint(hsotg,
periodic ? S3C_GINTSTS_PTxFEmp :
S3C_GINTSTS_NPTxFEmp);
}

/* see if we can write data */

if (to_write > can_write) {
Expand Down

0 comments on commit cbaaeaf

Please sign in to comment.