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.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 564eaa5525d7..93720bdc9efd 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1649,7 +1649,7 @@ void usb_disconnect(struct usb_device **pdev)
1649 1649
1650 /* mark the device as inactive, so any further urb submissions for 1650 /* mark the device as inactive, so any further urb submissions for
1651 * this device (and any of its children) will fail immediately. 1651 * this device (and any of its children) will fail immediately.
1652 * this quiesces everyting except pending urbs. 1652 * this quiesces everything except pending urbs.
1653 */ 1653 */
1654 usb_set_device_state(udev, USB_STATE_NOTATTACHED); 1654 usb_set_device_state(udev, USB_STATE_NOTATTACHED);
1655 dev_info(&udev->dev, "USB disconnect, device number %d\n", 1655 dev_info(&udev->dev, "USB disconnect, device number %d\n",
@@ -2285,7 +2285,17 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
2285 } 2285 }
2286 2286
2287 /* see 7.1.7.6 */ 2287 /* see 7.1.7.6 */
2288 status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND); 2288 /* Clear PORT_POWER if it's a USB3.0 device connected to USB 3.0
2289 * external hub.
2290 * FIXME: this is a temporary workaround to make the system able
2291 * to suspend/resume.
2292 */
2293 if ((hub->hdev->parent != NULL) && hub_is_superspeed(hub->hdev))
2294 status = clear_port_feature(hub->hdev, port1,
2295 USB_PORT_FEAT_POWER);
2296 else
2297 status = set_port_feature(hub->hdev, port1,
2298 USB_PORT_FEAT_SUSPEND);
2289 if (status) { 2299 if (status) {
2290 dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n", 2300 dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n",
2291 port1, status); 2301 port1, status);