diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-12-03 15:42:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:34:53 -0500 |
commit | 885e97478bf95b46a7cff40df49c2bb1a5503afd (patch) | |
tree | ddb8bc5e8a7ace8971cf4a472bb9b3a100db7c73 | |
parent | badef819229d455493ba97253dd0e4097b995624 (diff) |
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 <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 1f4f6d02fe25..85ec65ada123 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) | |||
1373 | 1373 | ||
1374 | /* let kernel drivers try to (re)bind to the interface */ | 1374 | /* let kernel drivers try to (re)bind to the interface */ |
1375 | case USBDEVFS_CONNECT: | 1375 | case USBDEVFS_CONNECT: |
1376 | usb_unlock_device(ps->dev); | 1376 | if (!intf->dev.driver) |
1377 | retval = bus_rescan_devices(intf->dev.bus); | 1377 | retval = device_attach(&intf->dev); |
1378 | usb_lock_device(ps->dev); | 1378 | else |
1379 | retval = -EBUSY; | ||
1379 | break; | 1380 | break; |
1380 | 1381 | ||
1381 | /* talk directly to the interface's driver */ | 1382 | /* talk directly to the interface's driver */ |