Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46693
b: refs/heads/master
c: 1096f78
h: refs/heads/master
i:
  46691: 264e8e3
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent 5b182c2 commit bbc048f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 629e4427aa817d5c9f11885420abf54b8f5967dc
refs/heads/master: 1096f780d0b9d6bade2d42bf823e81db3e553abe
23 changes: 12 additions & 11 deletions trunk/drivers/usb/storage/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,26 +731,27 @@ static int get_pipes(struct us_data *us)
struct usb_endpoint_descriptor *ep_int = NULL;

/*
* Find the endpoints we need.
* Find the first endpoint of each type we need.
* We are expecting a minimum of 2 endpoints - in and out (bulk).
* An optional interrupt is OK (necessary for CBI protocol).
* An optional interrupt-in is OK (necessary for CBI protocol).
* We will ignore any others.
*/
for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
ep = &altsetting->endpoint[i].desc;

/* Is it a BULK endpoint? */
if (usb_endpoint_xfer_bulk(ep)) {
/* BULK in or out? */
if (usb_endpoint_dir_in(ep))
ep_in = ep;
else
ep_out = ep;
if (usb_endpoint_dir_in(ep)) {
if (!ep_in)
ep_in = ep;
} else {
if (!ep_out)
ep_out = ep;
}
}

/* Is it an interrupt endpoint? */
else if (usb_endpoint_xfer_int(ep)) {
ep_int = ep;
else if (usb_endpoint_is_int_in(ep)) {
if (!ep_int)
ep_int = ep;
}
}

Expand Down

0 comments on commit bbc048f

Please sign in to comment.