lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231124145005.GA72525@vmlxhi-118.adit-jv.com>
Date:   Fri, 24 Nov 2023 15:50:05 +0100
From:   Hardik Gajjar <hgajjar@...adit-jv.com>
To:     Alan Stern <stern@...land.harvard.edu>
CC:     Hardik Gajjar <hgajjar@...adit-jv.com>,
        <gregkh@...uxfoundation.org>, <corbet@....net>, <tj@...nel.org>,
        <rdunlap@...radead.org>, <paulmck@...nel.org>,
        <linux-doc@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <erosca@...adit-jv.com>,
        <Martin.Mueller5@...bosch.com>
Subject: Re: [PATCH] usb: hubs: Decrease IN-endpoint poll interval for
 Microchip USB491x hub

On Thu, Nov 23, 2023 at 01:17:03PM -0500, Alan Stern wrote:
> On Thu, Nov 23, 2023 at 09:19:48AM +0100, Hardik Gajjar wrote:
> > There is a potential delay in announcing downstream USB bus activity to
> > Linux USB drivers due to the default interrupt endpoint having a poll
> > interval of 256ms.
> > 
> > Microchip has recommended ignoring the device descriptor and reducing
> > that value to 32ms, as it was too late to modify it in silicon.
> > 
> > This patch aims to speed up the USB enumeration process, facilitating
> > the successful completion of Apple CarPlay certifications and enhancing
> > user experience when utilizing USB devices through the Microchip Multihost
> > Hub.
> > 
> > A new quirk, USB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL, accelerates the
> > notification process by changing the Endpoint interrupt poll interval
> > from 256ms to 32ms.
> 
> But this is meant to apply only to hubs, right?  So shouldn't it be a 
> HUB_QUIRK_32_MS_INTR_INTERVAL macro, used in hub.c's hub_id_table, 
> rather than a general USB quirk?

Thank you, Alan, for the feedback. To confirm my understanding, are you suggesting
moving all implementations to hub.c, adding the hub-specific quirk, and using the
same quirk to update the bInterval value parsed by usb_get_configuration() in
usb_enumerate_device()?"

> 
> > Signed-off-by: Hardik Gajjar <hgajjar@...adit-jv.com>
> > ---
> >  Documentation/admin-guide/kernel-parameters.txt |  4 ++++
> >  drivers/usb/core/config.c                       |  8 ++++++++
> >  drivers/usb/core/quirks.c                       | 11 +++++++++++
> >  include/linux/usb/quirks.h                      |  5 +++++
> >  4 files changed, 28 insertions(+)
> > 
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index 65731b060e3f..6b0a66f0e6bf 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -6908,6 +6908,10 @@
> >  					pause after every control message);
> >  				o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra
> >  					delay after resetting its port);
> > +				p = USB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL (Set
> > +					bInterval to a Maximum of 9 to Reduce
> > +					default Poll Rate from 256 ms to
> > +					32 ms);
> 
> 256 ms and 32 ms are _periods_ (or intervals), not _rates_.
> 
> bInterval=9 corresponds to 32 ms only for High Speed and SuperSpeed* 
> devices.  For Low and Full Speed it corresponds to 9 ms.  Explanatory 
> comments should strive not to be misleading.
> 
> Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ