From: Alan Stern <stern@rowland.harvard.edu>
To: Zeng Tao <prime.zeng@hisilicon.com>
Cc: gregkh@linuxfoundation.org, <mathias.nyman@linux.intel.com>,
<drinkcat@chromium.org>, <felipe.balbi@linux.intel.com>,
<drake@endlessm.com>, <mike.looijmans@topic.nl>,
<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>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v2] usb: hub: try old enumeration scheme first for high speed devices
Date: Fri, 17 Aug 2018 10:19:19 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1808171018220.1451-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1534503120-1226-1-git-send-email-prime.zeng@hisilicon.com>
On Fri, 17 Aug 2018, 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>
> ---
> 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.
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 ++-
> drivers/usb/core/hub.c | 5 ++++-
> 2 files changed, 6 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..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);
Minor style point: the preceding blank line should be eliminated.
> +
> 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?
Aside from that:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
next prev parent reply other threads:[~2018-08-17 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-17 10:51 [PATCH v2] usb: hub: try old enumeration scheme first for high speed devices Zeng Tao
2018-08-17 14:19 ` Alan Stern [this message]
2018-08-20 1:59 ` Zengtao (B)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44L0.1808171018220.1451-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=corbet@lwn.net \
--cc=drake@endlessm.com \
--cc=drinkcat@chromium.org \
--cc=felipe.balbi@linux.intel.com \
--cc=frederic@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=kai.heng.feng@canonical.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mathias.nyman@linux.intel.com \
--cc=mike.looijmans@topic.nl \
--cc=mingo@kernel.org \
--cc=prime.zeng@hisilicon.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=thymovanbeers@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).