From: Roger Quadros <rogerq@ti.com>
To: "Zengtao (B)" <prime.zeng@hisilicon.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
"mathias.nyman@linux.intel.com" <mathias.nyman@linux.intel.com>,
"drinkcat@chromium.org" <drinkcat@chromium.org>,
"felipe.balbi@linux.intel.com" <felipe.balbi@linux.intel.com>,
"drake@endlessm.com" <drake@endlessm.com>,
"mike.looijmans@topic.nl" <mike.looijmans@topic.nl>,
"joe@perches.com" <joe@perches.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: hub: try old enumeration scheme first for high speed devices
Date: Thu, 16 Aug 2018 10:31:42 +0300 [thread overview]
Message-ID: <bf88d120-0147-a42a-9217-8fc91bd3ee2a@ti.com> (raw)
In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED0C9B129B@dggemm526-mbx.china.huawei.com>
On 14/08/18 10:33, Zengtao (B) wrote:
> Hi Roger:
>
> Thank you for review
>
>> -----Original Message-----
>> From: Roger Quadros [mailto:rogerq@ti.com]
>> Sent: Friday, August 10, 2018 6:51 PM
>> To: Zengtao (B) <prime.zeng@hisilicon.com>; gregkh@linuxfoundation.org;
>> stern@rowland.harvard.edu; mathias.nyman@linux.intel.com;
>> drinkcat@chromium.org; felipe.balbi@linux.intel.com; drake@endlessm.com;
>> mike.looijmans@topic.nl; joe@perches.com
>> Cc: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH] usb: hub: try old enumeration scheme first for high speed
>> devices
>>
>> Hi,
>>
>> On 10/08/18 18:01, 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.
>>
>> How slow does it get? Is it significant?
>> Do we risk breaking existing HS devices that work? I don't think we can be sure
>> till we run this through testing.
>>
>
> We added the new scheme because this is what the windows did , and mainly for
> legacy low and full speed devices.
> Now for new windows version(8.1 and later), the second port reset has already been
> removed for high speed devices for better enumeration speed.
> And In this patch if use_both_schemes is true, it will fallback to new scheme if the old
> scheme fails.
>
> So I think it's reasonable to follow the windows behavior again.
>
>>>
>>> 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;
>>
>> how about replacing the above if with
>>
>> if (udev->speed >= USB_SPEED_HIGH)
>> return false;
>
> No, for SS device, only use old scheme, but for speed device, we can fallback to new
> scheme if the old fails.
You are correct.
>
>>>
>>> - 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);
>>> }
>>
>> Now we no longer respect the "old_scheme_first" parameter for most of the
>> devices.
>>
>> It should be clarified in Documentation/admin/kernel-parameters.txt that
>> "old_scheme_first" is only applicable to LOW/FULL speed devices.
>>
>
> On the contrary, new scheme is only applicable for LOW/FULL speed devices?
No. What I meant is that the "old_scheme_first" module parameter is now
only applicable for LOW/FULL speed devices.
As HIGH_SPEED devices will always use old scheme first after this patch.
cheers,
-roger
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2018-08-16 7:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 15:01 Zeng Tao
2018-08-10 10:50 ` Roger Quadros
2018-08-10 14:19 ` Alan Stern
2018-08-14 7:35 ` Zengtao (B)
2018-08-14 14:39 ` Alan Stern
2018-08-16 6:21 ` Zengtao (B)
2018-08-16 7:16 ` Roger Quadros
2018-08-16 10:59 ` Zengtao (B)
2018-08-16 11:13 ` Roger Quadros
2018-08-17 2:15 ` Zengtao (B)
2018-08-14 7:33 ` Zengtao (B)
2018-08-16 7:31 ` Roger Quadros [this message]
2018-09-28 11:27 Zeng Tao
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=bf88d120-0147-a42a-9217-8fc91bd3ee2a@ti.com \
--to=rogerq@ti.com \
--cc=drake@endlessm.com \
--cc=drinkcat@chromium.org \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=mike.looijmans@topic.nl \
--cc=prime.zeng@hisilicon.com \
--cc=stern@rowland.harvard.edu \
/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
all inboxes | Powered by JetHome®