Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=643616e6780b26dd8c9cea0b9344bb5d7aeae29d
Commit:     643616e6780b26dd8c9cea0b9344bb5d7aeae29d
Parent:     c4cabd28c73116716dcfd0d5f91414b48c0cf5ce
Author:     Pete Zaitcev <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 8 19:56:23 2007 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 13:28:34 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 2098eff..746a118 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,
                if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
                                == USB_ENDPOINT_XFER_BULK) {
                        /* BULK in or out? */
-                       if (ep->bEndpointAddress & USB_DIR_IN)
-                               ep_in = ep;
-                       else
-                               ep_out = ep;
+                       if (ep->bEndpointAddress & USB_DIR_IN) {
+                               if (ep_in == NULL)
+                                       ep_in = ep;
+                       } else {
+                               if (ep_out == NULL)
+                                       ep_out = ep;
+                       }
                }
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to