diff options
author | Linaro CI <ci_notify@linaro.org> | 2017-09-24 20:35:18 +0000 |
---|---|---|
committer | Linaro CI <ci_notify@linaro.org> | 2017-09-24 20:35:18 +0000 |
commit | c03adb6848aa7e80ad0c0e46b9f6d96ba0a91822 (patch) | |
tree | 05de08cd2d77fc5697e9e6fc1fae5ef23a1d0a85 /drivers/usb/core/hub.c | |
parent | 6ce85a78b6151e8ab2eac57e1447d90d3efb551d (diff) | |
parent | 357fdc8959dc79696d9c43c2a3f7a93e3a503d87 (diff) |
Merge remote-tracking branch 'sumit-lts/lts-4.4.y-hikey' into linux-4.4.y4.4.89-rc1-hikey-20170924
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index cdf4be3939f5..a20a345fef51 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2092,6 +2092,12 @@ void usb_disconnect(struct usb_device **pdev) */ pm_runtime_barrier(&udev->dev); + if (udev->speed < USB_SPEED_HIGH ) { + struct usb_hcd *hcd = bus_to_hcd(udev->bus); + if (hcd->driver->change_bus_speed) + hcd->driver->change_bus_speed(hcd, 0); + } + usb_lock_device(udev); hub_disconnect_children(udev); @@ -4859,9 +4865,19 @@ loop: if (hub->hdev->parent || !hcd->driver->port_handed_over || !(hcd->driver->port_handed_over)(hcd, port1)) { - if (status != -ENOTCONN && status != -ENODEV) + if (status != -ENOTCONN && status != -ENODEV) { dev_err(&port_dev->dev, - "unable to enumerate USB device\n"); + "unable to enumerate USB device" + " at %s while bus at %s \n", + usb_speed_string(udev->speed), + hdev->descriptor.bDeviceProtocol == USB_HUB_PR_FS ? + "FULL_SPEED" : "HIGH_SPEED"); + + if (udev->speed < USB_SPEED_HIGH && + hdev->descriptor.bDeviceProtocol > USB_HUB_PR_FS && + hcd->driver->change_bus_speed) + hcd->driver->change_bus_speed(hcd, 1); + } } done: |