diff options
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 7ccdd3d4db84..cf7bbcb9a63c 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -4948,6 +4948,15 @@ loop: | |||
4948 | usb_put_dev(udev); | 4948 | usb_put_dev(udev); |
4949 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) | 4949 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) |
4950 | break; | 4950 | break; |
4951 | |||
4952 | /* When halfway through our retry count, power-cycle the port */ | ||
4953 | if (i == (SET_CONFIG_TRIES / 2) - 1) { | ||
4954 | dev_info(&port_dev->dev, "attempt power cycle\n"); | ||
4955 | usb_hub_set_port_power(hdev, hub, port1, false); | ||
4956 | msleep(2 * hub_power_on_good_delay(hub)); | ||
4957 | usb_hub_set_port_power(hdev, hub, port1, true); | ||
4958 | msleep(hub_power_on_good_delay(hub)); | ||
4959 | } | ||
4951 | } | 4960 | } |
4952 | if (hub->hdev->parent || | 4961 | if (hub->hdev->parent || |
4953 | !hcd->driver->port_handed_over || | 4962 | !hcd->driver->port_handed_over || |