Commit a8f08d86 authored by Andiry Xu's avatar Andiry Xu Committed by Sarah Sharp

usbcore: Bug fix: system can't suspend with USB3.0 device connected to USB3.0 hub

This patch clear PORT_POWER when suspend a USB3.0 device behind a USB3.0
external hub, so the system can suspend and resume.

Note USB3.0 device may not work after system resume and this is a temporary
workaround. The correct fix will be in future patches.
Signed-off-by: default avatarAndiry Xu <andiry.xu@amd.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
parent b214f191
...@@ -2285,7 +2285,17 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg) ...@@ -2285,7 +2285,17 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
} }
/* see 7.1.7.6 */ /* see 7.1.7.6 */
status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND); /* Clear PORT_POWER if it's a USB3.0 device connected to USB 3.0
* external hub.
* FIXME: this is a temporary workaround to make the system able
* to suspend/resume.
*/
if ((hub->hdev->parent != NULL) && hub_is_superspeed(hub->hdev))
status = clear_port_feature(hub->hdev, port1,
USB_PORT_FEAT_POWER);
else
status = set_port_feature(hub->hdev, port1,
USB_PORT_FEAT_SUSPEND);
if (status) { if (status) {
dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n", dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n",
port1, status); port1, status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment