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:  		usb_put_dev(udev);  		if ((status == -ENOTCONN) || (status == -ENOTSUPP))  			break; + +		/* When halfway through our retry count, power-cycle the port */ +		if (i == (SET_CONFIG_TRIES / 2) - 1) { +			dev_info(&port_dev->dev, "attempt power cycle\n"); +			usb_hub_set_port_power(hdev, hub, port1, false); +			msleep(2 * hub_power_on_good_delay(hub)); +			usb_hub_set_port_power(hdev, hub, port1, true); +			msleep(hub_power_on_good_delay(hub)); +		}  	}  	if (hub->hdev->parent ||  			!hcd->driver->port_handed_over ||  |