Support duo4k.
[vuplus_openvuplus_3.0] / meta-bsp / recipes-kernel / linux / linux-vuplus-4.1.45 / vuduo4k / linux_usb_hub.patch
1 diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
2 index 137276f..7a68c58 100644
3 --- a/drivers/usb/core/hub.c
4 +++ b/drivers/usb/core/hub.c
5 @@ -1043,6 +1043,12 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
6                         unsigned delay = hub_power_on_good_delay(hub);
7  
8                         hub_power_on(hub, false);
9 +
10 +                       if( hdev->devnum == 1 && hdev->bus->busnum ==2 ){
11 +                               //dev_dbg(hub->hdev, "Found USB 3.0 RootHub");
12 +                               delay = 10000;
13 +                       }
14 +
15                         INIT_DELAYED_WORK(&hub->init_work, hub_init_func2);
16                         queue_delayed_work(system_power_efficient_wq,
17                                         &hub->init_work,
18 @@ -5057,8 +5063,10 @@ static void hub_event(struct work_struct *work)
19                 hub->error = 0;
20         }
21  
22 +       msleep(1000);
23         /* deal with port status changes */
24 -       for (i = 1; i <= hdev->maxchild; i++) {
25 +       //for (i = 1; i <= hdev->maxchild; i++) {
26 +       for (i = hdev->maxchild ; i >= 1; i--) {
27                 struct usb_port *port_dev = hub->ports[i - 1];
28  
29                 if (test_bit(i, hub->event_bits)