lkml.org 
[lkml]   [2018]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] usb: hub: try old enumeration scheme first for high speed devices
Date
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.

Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
drivers/usb/core/hub.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 1fb2668..d265b19 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2661,10 +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?
--
2.7.4
\
 
 \ /
  Last update: 2018-08-10 09:05    [W:0.073 / U:3.336 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site