linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices
  2018-08-20 10:04 [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices Zeng Tao
@ 2018-08-20  6:55 ` Roger Quadros
  2018-09-20 10:37   ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Roger Quadros @ 2018-08-20  6:55 UTC (permalink / raw)
  To: Zeng Tao, gregkh, stern, mathias.nyman, drinkcat, felipe.balbi,
	drake, ravisadineni, joe
  Cc: Jonathan Corbet, Thomas Gleixner, Ingo Molnar, Rafael J. Wysocki,
	Marc Zyngier, Kai-Heng Feng, Thymo van Beers, Frederic Weisbecker,
	Konrad Rzeszutek Wilk, David Rientjes, Mike Looijmans, linux-doc,
	linux-kernel, linux-usb

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>

> ---
> Changes in v2:
> 1. As suggested by Alan, mention in the commit log that this change is
> follow what the Window does.
> 2. As suggested by Roger, update the kernel-parameter description.
> 
> Changes in v3:
> 1. Remove the blank line suggested by Alan.
> 2. Tag applied.
> 
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 3 ++-
>  drivers/usb/core/hub.c                          | 4 +++-
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> 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?
> 

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices
@ 2018-08-20 10:04 Zeng Tao
  2018-08-20  6:55 ` Roger Quadros
  0 siblings, 1 reply; 4+ messages in thread
From: Zeng Tao @ 2018-08-20 10:04 UTC (permalink / raw)
  To: gregkh, stern, mathias.nyman, drinkcat, felipe.balbi, drake,
	ravisadineni, joe
  Cc: prime.zeng, Jonathan Corbet, Thomas Gleixner, Ingo Molnar,
	Rafael J. Wysocki, Marc Zyngier, Kai-Heng Feng, Thymo van Beers,
	Frederic Weisbecker, Konrad Rzeszutek Wilk, David Rientjes,
	Mike Looijmans, linux-doc, linux-kernel, linux-usb

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>
---
Changes in v2:
1. As suggested by Alan, mention in the commit log that this change is
follow what the Window does.
2. As suggested by Roger, update the kernel-parameter description.

Changes in v3:
1. Remove the blank line suggested by Alan.
2. Tag applied.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 3 ++-
 drivers/usb/core/hub.c                          | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

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?
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices
  2018-08-20  6:55 ` Roger Quadros
@ 2018-09-20 10:37   ` Greg KH
  2018-09-28  3:24     ` Zengtao (B)
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2018-09-20 10:37 UTC (permalink / raw)
  To: Roger Quadros
  Cc: Zeng Tao, stern, mathias.nyman, drinkcat, felipe.balbi, drake,
	ravisadineni, joe, Jonathan Corbet, Thomas Gleixner, Ingo Molnar,
	Rafael J. Wysocki, Marc Zyngier, Kai-Heng Feng, Thymo van Beers,
	Frederic Weisbecker, Konrad Rzeszutek Wilk, David Rientjes,
	Mike Looijmans, linux-doc, linux-kernel, linux-usb

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices
  2018-09-20 10:37   ` Greg KH
@ 2018-09-28  3:24     ` Zengtao (B)
  0 siblings, 0 replies; 4+ messages in thread
From: Zengtao (B) @ 2018-09-28  3:24 UTC (permalink / raw)
  To: Greg KH, Roger Quadros
  Cc: stern@rowland.harvard.edu, mathias.nyman@linux.intel.com,
	drinkcat@chromium.org, felipe.balbi@linux.intel.com,
	drake@endlessm.com, ravisadineni@chromium.org, joe@perches.com,
	Jonathan Corbet, Thomas Gleixner, Ingo Molnar, Rafael J. Wysocki,
	Marc Zyngier, Kai-Heng Feng, Thymo van Beers, Frederic Weisbecker,
	Konrad Rzeszutek Wilk, David Rientjes, Mike Looijmans,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org

Hi greg:

Sorry for the late response, I have applied the tags and resend, please receive it and check

Thx
Zengtao 

>-----Original Message-----
>From: Greg KH [mailto:gregkh@linuxfoundation.org]
>Sent: Thursday, September 20, 2018 6:38 PM
>To: Roger Quadros <rogerq@ti.com>
>Cc: Zengtao (B) <prime.zeng@hisilicon.com>; stern@rowland.harvard.edu;
>mathias.nyman@linux.intel.com; drinkcat@chromium.org;
>felipe.balbi@linux.intel.com; drake@endlessm.com;
>ravisadineni@chromium.org; joe@perches.com; Jonathan Corbet
><corbet@lwn.net>; Thomas Gleixner <tglx@linutronix.de>; Ingo Molnar
><mingo@kernel.org>; Rafael J. Wysocki <rafael.j.wysocki@intel.com>;
>Marc Zyngier <marc.zyngier@arm.com>; Kai-Heng Feng
><kai.heng.feng@canonical.com>; Thymo van Beers
><thymovanbeers@gmail.com>; Frederic Weisbecker
><frederic@kernel.org>; Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>;
>David Rientjes <rientjes@google.com>; Mike Looijmans
><mike.looijmans@topic.nl>; linux-doc@vger.kernel.org;
>linux-kernel@vger.kernel.org; linux-usb@vger.kernel.org
>Subject: Re: [PATCH v3] usb: hub: try old enumeration scheme first for
>high speed devices
>
>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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-28  3:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-20 10:04 [PATCH v3] usb: hub: try old enumeration scheme first for high speed devices Zeng Tao
2018-08-20  6:55 ` Roger Quadros
2018-09-20 10:37   ` Greg KH
2018-09-28  3:24     ` Zengtao (B)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).