Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248814
b: refs/heads/master
c: 4c5212b
h: refs/heads/master
v: v3
  • Loading branch information
Pavankumar Kondeti authored and Greg Kroah-Hartman committed May 3, 2011
1 parent 8d313d3 commit f8afd34
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 986b11b8c7ac3d8752790654637bd944ea18ee79
refs/heads/master: 4c5212b7688955075b166def5ce08b34beb87a9c
8 changes: 7 additions & 1 deletion trunk/drivers/usb/gadget/ci13xxx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ __acquires(udc->lock)

for (i = 0; i < hw_ep_max; i++) {
struct ci13xxx_ep *mEp = &udc->ci13xxx_ep[i];
int type, num, err = -EINVAL;
int type, num, dir, err = -EINVAL;
struct usb_ctrlrequest req;

if (mEp->desc == NULL)
Expand Down Expand Up @@ -1952,7 +1952,10 @@ __acquires(udc->lock)
if (req.wLength != 0)
break;
num = le16_to_cpu(req.wIndex);
dir = num & USB_ENDPOINT_DIR_MASK;
num &= USB_ENDPOINT_NUMBER_MASK;
if (dir) /* TX */
num += hw_ep_max/2;
if (!udc->ci13xxx_ep[num].wedge) {
spin_unlock(udc->lock);
err = usb_ep_clear_halt(
Expand Down Expand Up @@ -2001,7 +2004,10 @@ __acquires(udc->lock)
if (req.wLength != 0)
break;
num = le16_to_cpu(req.wIndex);
dir = num & USB_ENDPOINT_DIR_MASK;
num &= USB_ENDPOINT_NUMBER_MASK;
if (dir) /* TX */
num += hw_ep_max/2;

spin_unlock(udc->lock);
err = usb_ep_set_halt(&udc->ci13xxx_ep[num].ep);
Expand Down

0 comments on commit f8afd34

Please sign in to comment.