Commit:     885e97478bf95b46a7cff40df49c2bb1a5503afd
Parent:     badef819229d455493ba97253dd0e4097b995624
Author:     Alan Stern <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 3 15:42:10 2007 -0500
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:34:53 2008 -0800

    USB: repair USBDEVFS_CONNECT ioctl
    For as long as I've known about it, the USBDEVFS_CONNECT ioctl hasn't
    done what it's supposed to.  The current code reprobes _all_ the
    unbound USB interfaces; this patch (as1021) makes it reprobe only the
    interface for which it was called.
    Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/usb/core/devio.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 1f4f6d0..85ec65a 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1373,9 +1373,10 @@ static int proc_ioctl(struct dev_state *ps, struct 
usbdevfs_ioctl *ctl)
        /* let kernel drivers try to (re)bind to the interface */
        case USBDEVFS_CONNECT:
-               usb_unlock_device(ps->dev);
-               retval = bus_rescan_devices(intf->dev.bus);
-               usb_lock_device(ps->dev);
+               if (!intf->dev.driver)
+                       retval = device_attach(&intf->dev);
+               else
+                       retval = -EBUSY;
        /* talk directly to the interface's driver */
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

Reply via email to