diff options
author | Pete Zaitcev <zaitcev@redhat.com> | 2007-03-08 22:56:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 16:28:34 -0400 |
commit | 643616e6780b26dd8c9cea0b9344bb5d7aeae29d (patch) | |
tree | 063e1dd32c86c5fe3a6319c5c8df84aec7b3324f | |
parent | c4cabd28c73116716dcfd0d5f91414b48c0cf5ce (diff) |
ub: Bind to first endpoint, not to last
The usb-storage switched to binding to first endpoint recently. Apparently,
there are devices out there with extra endpoints. It is perfectly legal.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/block/ub.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 2098eff91e14..746a118a9b52 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -2132,10 +2132,13 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev, | |||
2132 | if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | 2132 | if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) |
2133 | == USB_ENDPOINT_XFER_BULK) { | 2133 | == USB_ENDPOINT_XFER_BULK) { |
2134 | /* BULK in or out? */ | 2134 | /* BULK in or out? */ |
2135 | if (ep->bEndpointAddress & USB_DIR_IN) | 2135 | if (ep->bEndpointAddress & USB_DIR_IN) { |
2136 | ep_in = ep; | 2136 | if (ep_in == NULL) |
2137 | else | 2137 | ep_in = ep; |
2138 | ep_out = ep; | 2138 | } else { |
2139 | if (ep_out == NULL) | ||
2140 | ep_out = ep; | ||
2141 | } | ||
2139 | } | 2142 | } |
2140 | } | 2143 | } |
2141 | 2144 | ||