Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364512
b: refs/heads/master
c: b983e51
h: refs/heads/master
v: v3
  • Loading branch information
Michael Grzeschik authored and Greg Kroah-Hartman committed Mar 30, 2013
1 parent c67b125 commit 02d6877
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 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: dd064e9d36b32616e72dc9c1871d7e667cd970ce
refs/heads/master: b983e51a73b60b358e2c15a64c0c489cb266fe67
1 change: 1 addition & 0 deletions trunk/drivers/usb/chipidea/ci.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
/******************************************************************************
* DEFINE
*****************************************************************************/
#define TD_PAGE_COUNT 5
#define CI13XXX_PAGE_SIZE 4096ul /* page size for TD's */
#define ENDPT_MAX 32

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
mReq->ptr->token |= cpu_to_le32(TD_IOC);
}
mReq->ptr->page[0] = cpu_to_le32(mReq->req.dma);
for (i = 1; i < 5; i++) {
for (i = 1; i < TD_PAGE_COUNT; i++) {
u32 page = mReq->req.dma + i * CI13XXX_PAGE_SIZE;
page &= ~TD_RESERVED_MASK;
mReq->ptr->page[i] = cpu_to_le32(page);
Expand Down Expand Up @@ -676,7 +676,7 @@ static int _ep_queue(struct usb_ep *ep, struct usb_request *req,
return -EBUSY;
}

if (req->length > 4 * CI13XXX_PAGE_SIZE) {
if (req->length > (TD_PAGE_COUNT - 1) * CI13XXX_PAGE_SIZE) {
dev_err(mEp->ci->dev, "request bigger than one td\n");
return -EMSGSIZE;
}
Expand Down

0 comments on commit 02d6877

Please sign in to comment.