summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2010-05-07 18:09:27 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:43 -0700
commit9f0a6cd3ce34de5f9d34b5bf07e1b973a5cd2aa2 (patch)
treebc44274a1f11035a5934b084bcf458c07fd3c278 /drivers/usb/core
parent82b71cfdf36d568c7a2e44efd705471c3c2caaa2 (diff)
downloadop-kernel-dev-9f0a6cd3ce34de5f9d34b5bf07e1b973a5cd2aa2.zip
op-kernel-dev-9f0a6cd3ce34de5f9d34b5bf07e1b973a5cd2aa2.tar.gz
USB: usbcore: Do not disable USB3 protocol ports in hub_activate()
When USB3 protocol port detects an USB3.0 device attach, the port will automatically transition to the Enabled state upon the completion of successful link training. Do not disable USB3 protocol ports in hub_activate(), or USB3.0 device will fail to be recognized if xHCI bus power management is implemented. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/hub.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 2a767b3..83e7bbb 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -744,8 +744,20 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
!(portstatus & USB_PORT_STAT_CONNECTION) ||
!udev ||
udev->state == USB_STATE_NOTATTACHED)) {
- clear_port_feature(hdev, port1, USB_PORT_FEAT_ENABLE);
- portstatus &= ~USB_PORT_STAT_ENABLE;
+ /*
+ * USB3 protocol ports will automatically transition
+ * to Enabled state when detect an USB3.0 device attach.
+ * Do not disable USB3 protocol ports.
+ * FIXME: USB3 root hub and external hubs are treated
+ * differently here.
+ */
+ if (hdev->descriptor.bDeviceProtocol != 3 ||
+ (!hdev->parent &&
+ !(portstatus & USB_PORT_STAT_SUPER_SPEED))) {
+ clear_port_feature(hdev, port1,
+ USB_PORT_FEAT_ENABLE);
+ portstatus &= ~USB_PORT_STAT_ENABLE;
+ }
}
/* Clear status-change flags; we'll debounce later */
OpenPOWER on IntegriCloud