aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 70cccc75a36..84c1897188d 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -20,6 +20,7 @@
20#include <linux/usb.h> 20#include <linux/usb.h>
21#include <linux/usbdevice_fs.h> 21#include <linux/usbdevice_fs.h>
22#include <linux/usb/hcd.h> 22#include <linux/usb/hcd.h>
23#include <linux/usb/quirks.h>
23#include <linux/kthread.h> 24#include <linux/kthread.h>
24#include <linux/mutex.h> 25#include <linux/mutex.h>
25#include <linux/freezer.h> 26#include <linux/freezer.h>
@@ -1294,6 +1295,7 @@ descriptor_error:
1294 return -ENODEV; 1295 return -ENODEV;
1295} 1296}
1296 1297
1298/* No BKL needed */
1297static int 1299static int
1298hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data) 1300hub_ioctl(struct usb_interface *intf, unsigned int code, void *user_data)
1299{ 1301{
@@ -1801,7 +1803,6 @@ int usb_new_device(struct usb_device *udev)
1801 pm_runtime_set_active(&udev->dev); 1803 pm_runtime_set_active(&udev->dev);
1802 pm_runtime_enable(&udev->dev); 1804 pm_runtime_enable(&udev->dev);
1803 1805
1804 usb_detect_quirks(udev);
1805 err = usb_enumerate_device(udev); /* Read descriptors */ 1806 err = usb_enumerate_device(udev); /* Read descriptors */
1806 if (err < 0) 1807 if (err < 0)
1807 goto fail; 1808 goto fail;
@@ -2880,7 +2881,9 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1,
2880 } 2881 }
2881 2882
2882 retval = 0; 2883 retval = 0;
2883 2884 /* notify HCD that we have a device connected and addressed */
2885 if (hcd->driver->update_device)
2886 hcd->driver->update_device(hcd, udev);
2884fail: 2887fail:
2885 if (retval) { 2888 if (retval) {
2886 hub_port_disable(hub, port1, 0); 2889 hub_port_disable(hub, port1, 0);
@@ -3111,6 +3114,10 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
3111 if (status < 0) 3114 if (status < 0)
3112 goto loop; 3115 goto loop;
3113 3116
3117 usb_detect_quirks(udev);
3118 if (udev->quirks & USB_QUIRK_DELAY_INIT)
3119 msleep(1000);
3120
3114 /* consecutive bus-powered hubs aren't reliable; they can 3121 /* consecutive bus-powered hubs aren't reliable; they can
3115 * violate the voltage drop budget. if the new child has 3122 * violate the voltage drop budget. if the new child has
3116 * a "powered" LED, users should notice we didn't enable it 3123 * a "powered" LED, users should notice we didn't enable it
@@ -3463,7 +3470,7 @@ static struct usb_driver hub_driver = {
3463 .reset_resume = hub_reset_resume, 3470 .reset_resume = hub_reset_resume,
3464 .pre_reset = hub_pre_reset, 3471 .pre_reset = hub_pre_reset,
3465 .post_reset = hub_post_reset, 3472 .post_reset = hub_post_reset,
3466 .ioctl = hub_ioctl, 3473 .unlocked_ioctl = hub_ioctl,
3467 .id_table = hub_id_table, 3474 .id_table = hub_id_table,
3468 .supports_autosuspend = 1, 3475 .supports_autosuspend = 1,
3469}; 3476};