summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZeng Tao <prime.zeng@hisilicon.com>2018-09-28 14:27:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-02 22:05:30 +0300
commitbd0e6c9614b95352eb31d0207df16dc156c527fa (patch)
tree274c7a7b59d5b149f183371dff221a52f292a9b4 /drivers
parent2cfe8f864d0e2504dc2f68f0b04668d877f7c7b4 (diff)
downloadlinux-bd0e6c9614b95352eb31d0207df16dc156c527fa.tar.xz
usb: hub: try old enumeration scheme first for high speed devices
The new scheme is required just to support legacy low and full-speed devices. For high speed devices, it will slower the enumeration speed. So in this patch we try the "old" enumeration scheme first for high speed devices, and this is what Windows does since Windows 8. Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/hub.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 7801bb30bdba..bf76a3dd4359 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2661,11 +2661,13 @@ static bool use_new_scheme(struct usb_device *udev, int retry,
{
int old_scheme_first_port =
port_dev->quirks & USB_PORT_QUIRK_OLD_SCHEME;
+ int quick_enumeration = (udev->speed == USB_SPEED_HIGH);
if (udev->speed >= USB_SPEED_SUPER)
return false;
- return USE_NEW_SCHEME(retry, old_scheme_first_port || old_scheme_first);
+ return USE_NEW_SCHEME(retry, old_scheme_first_port || old_scheme_first
+ || quick_enumeration);
}
/* Is a USB 3.0 port in the Inactive or Compliance Mode state?