Message ID | 1534759484-44744-1-git-send-email-prime.zeng@hisilicon.com |
---|---|
State | Superseded |
Headers | show |
Series | [v3] usb: hub: try old enumeration scheme first for high speed devices | expand |
On Mon, Aug 20, 2018 at 09:55:49AM +0300, Roger Quadros wrote: > On 20/08/18 13:04, Zeng Tao wrote: > > 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> > > You need to add Alan's Ack here. I don't think you need to resend though. > > Reviewed-by: Roger Quadros <rogerq@ti.com> Please resend, I need his ack here :) thanks, greg k-h
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 533ff5c..95db23c 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4453,7 +4453,8 @@ usbcore.old_scheme_first= [USB] Start with the old device initialization - scheme (default 0 = off). + scheme, applies only to low and full-speed devices + (default 0 = off). usbcore.usbfs_memory_mb= [USB] Memory limit (in MB) for buffers allocated by diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 1fb2668..003fac0 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2660,11 +2660,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?