Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364507
b: refs/heads/master
c: 1cd12a9
h: refs/heads/master
i:
  364505: bc9bf79
  364503: f371f97
v: v3
  • Loading branch information
Michael Grzeschik authored and Greg Kroah-Hartman committed Mar 30, 2013
1 parent 00d9dcc commit 447e007
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 080ff5f4719e21c78f8ec96eea4f82b2fd047fa4
refs/heads/master: 1cd12a9cf055e72b3094ef38ac4d9afff2e9520e
14 changes: 5 additions & 9 deletions trunk/drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ static int ep_enable(struct usb_ep *ep,
struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep);
int retval = 0;
unsigned long flags;
u32 cap = 0;

if (ep == NULL || desc == NULL)
return -EINVAL;
Expand All @@ -1005,17 +1006,12 @@ static int ep_enable(struct usb_ep *ep,

mEp->ep.maxpacket = usb_endpoint_maxp(desc);

mEp->qh.ptr->cap = 0;

if (mEp->type == USB_ENDPOINT_XFER_CONTROL)
mEp->qh.ptr->cap |= cpu_to_le32(QH_IOS);
else if (mEp->type == USB_ENDPOINT_XFER_ISOC)
mEp->qh.ptr->cap &= cpu_to_le32(~QH_MULT);
else
mEp->qh.ptr->cap &= cpu_to_le32(~QH_ZLT);
cap |= QH_IOS;
cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT;

mEp->qh.ptr->cap = cpu_to_le32(cap);

mEp->qh.ptr->cap |= cpu_to_le32((mEp->ep.maxpacket << __ffs(QH_MAX_PKT))
& QH_MAX_PKT);
mEp->qh.ptr->td.next |= cpu_to_le32(TD_TERMINATE); /* needed? */

/*
Expand Down

0 comments on commit 447e007

Please sign in to comment.