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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c4cabd28c7
commit
643616e678
@@ -2132,10 +2132,13 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev,
|
|||||||
if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
|
||||||
== USB_ENDPOINT_XFER_BULK) {
|
== USB_ENDPOINT_XFER_BULK) {
|
||||||
/* BULK in or out? */
|
/* BULK in or out? */
|
||||||
if (ep->bEndpointAddress & USB_DIR_IN)
|
if (ep->bEndpointAddress & USB_DIR_IN) {
|
||||||
ep_in = ep;
|
if (ep_in == NULL)
|
||||||
else
|
ep_in = ep;
|
||||||
ep_out = ep;
|
} else {
|
||||||
|
if (ep_out == NULL)
|
||||||
|
ep_out = ep;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user