From: Greg KH <gregkh@linuxfoundation.org>
To: Hardik Gajjar <hgajjar@de.adit-jv.com>
Cc: mathias.nyman@intel.com, stern@rowland.harvard.edu,
yangyingliang@huawei.com, jinpu.wang@ionos.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
erosca@de.adit-jv.com
Subject: Re: [PATCH v3] usb: core: hub: Add quirks for reducing device address timeout
Date: Wed, 11 Oct 2023 17:23:26 +0200 [thread overview]
Message-ID: <2023101155-unframed-satirical-f7ec@gregkh> (raw)
In-Reply-To: <20231011120535.GA89684@vmlxhi-118.adit-jv.com>
On Wed, Oct 11, 2023 at 02:05:35PM +0200, Hardik Gajjar wrote:
> On Wed, Oct 11, 2023 at 11:02:27AM +0200, Greg KH wrote:
> > On Wed, Oct 11, 2023 at 10:50:11AM +0200, Hardik Gajjar wrote:
> > > Currently, the timeout for the set address command is fixed at
> > > 5 seconds in the xhci driver. This means the host waits up to 5
> > > seconds to receive a response for the set_address command from
> > > the device.
> > >
> > > In the automotive context, most smartphone enumerations, including
> > > screen projection, should ideally complete within 3 seconds.
> > > Achieving this is impossible in scenarios where the set_address is
> > > not successful and waits for a timeout.
> > >
> > > The shortened address device timeout quirks provide the flexibility
> > > to align with a 3-second time limit in the event of errors.
> > > By swiftly triggering a failure response and swiftly initiating
> > > retry procedures, these quirks ensure efficient and rapid recovery,
> > > particularly in automotive contexts where rapid smartphone enumeration
> > > and screen projection are vital.
> > >
> > > The quirk will set the timeout to 500 ms from 5 seconds.
> > >
> > > To use the quirk, please write "vendor_id:product_id:p" to
> > > /sys/bus/usb/drivers/hub/module/parameter/quirks
> > >
> > > For example,
> > > echo "0x2c48:0x0132:p" > /sys/bus/usb/drivers/hub/module/parameter/quirks"
> > >
> > > Signed-off-by: Hardik Gajjar <hgajjar@de.adit-jv.com>
> > > ---
> > > changes since version 1:
> > > - implement quirk instead of new API in xhci driver
> > >
> > > changes since version 2:
> > > - Add documentation for the new quirk.
> > > - Define the timeout unit in milliseconds in variable names and function arguments.
> > > - Change the xHCI command timeout from HZ (jiffies) to milliseconds.
> > > - Add APTIV usb hub vendor and product ID in device quirk list
> > > - Adding some other comments for clarity
> > > ---
> > > .../admin-guide/kernel-parameters.txt | 3 +++
> > > drivers/usb/core/hub.c | 13 ++++++++--
> > > drivers/usb/core/quirks.c | 6 +++++
> > > drivers/usb/host/xhci-mem.c | 2 ++
> > > drivers/usb/host/xhci-ring.c | 11 ++++----
> > > drivers/usb/host/xhci.c | 25 +++++++++++++------
> > > drivers/usb/host/xhci.h | 6 +++--
> > > include/linux/usb/hcd.h | 5 ++--
> > > include/linux/usb/quirks.h | 3 +++
> > > 9 files changed, 56 insertions(+), 18 deletions(-)
> > >
> > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > > index 0a1731a0f0ef..44732d179bce 100644
> > > --- a/Documentation/admin-guide/kernel-parameters.txt
> > > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > > @@ -6817,6 +6817,9 @@
> > > pause after every control message);
> > > o = USB_QUIRK_HUB_SLOW_RESET (Hub needs extra
> > > delay after resetting its port);
> > > + p = USB_QUIRK_SHORT_DEVICE_ADDR_TIMEOUT ( Timeout
> > > + of set_address command reduce from 5000 ms
> > > + to 500 ms
> >
> > No trailing ")" character? And no need for the extra space after the
> > new "(" one, right?
> >
>
> Okay, update it. Interestingly, the 'scripts/checkpatch.pl' is not reporting such warnings
checkpatch doesn't parse documentation like this, so don't expect it to
catch stuff here.
thanks,
greg k-h
next prev parent reply other threads:[~2023-10-11 15:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <--in-reply-to=20231006153808.9758-1-hgajjar@de.adit-jv.com>
2023-10-09 16:14 ` [PATCH v2] " Hardik Gajjar
2023-10-09 17:43 ` Greg KH
2023-10-10 10:31 ` Hardik Gajjar
2023-10-10 11:25 ` Greg KH
2023-10-09 19:16 ` Alan Stern
2023-10-10 10:50 ` Hardik Gajjar
2023-10-10 13:40 ` Mathias Nyman
2023-10-11 8:50 ` [PATCH v3] " Hardik Gajjar
2023-10-11 9:02 ` Greg KH
2023-10-11 12:05 ` Hardik Gajjar
2023-10-11 15:23 ` Greg KH [this message]
2023-10-11 16:45 ` [PATCH v4] " Hardik Gajjar
2023-10-16 17:58 ` Greg KH
2023-10-17 16:10 ` Hardik Gajjar
2023-10-17 16:53 ` Greg KH
2023-10-17 18:59 ` Alan Stern
2023-10-21 10:15 ` Greg KH
2023-10-23 16:13 ` Hardik Gajjar
2023-10-24 15:44 ` Alan Stern
2023-10-25 14:11 ` [PATCH v5] usb: Reduce 'set_address' command timeout with a new quirk Hardik Gajjar
2023-10-25 14:13 ` Hardik Gajjar
2023-10-25 14:44 ` Alan Stern
2023-10-25 16:00 ` Sergey Shtylyov
2023-10-25 16:16 ` Sergey Shtylyov
2023-10-25 16:16 ` Sergey Shtylyov
2023-10-25 16:40 ` Hardik Gajjar
2023-10-26 10:15 ` [PATCH v6] usb: Reduce the 'SET_ADDRESS' request " Hardik Gajjar
2023-10-26 13:08 ` Mathias Nyman
2023-10-26 16:00 ` Sergey Shtylyov
2023-10-26 18:34 ` Alan Stern
2023-10-27 9:57 ` Hardik Gajjar
2023-10-11 10:50 ` [PATCH v3] usb: core: hub: Add quirks for reducing device address timeout kernel test robot
2023-10-11 14:15 ` Alan Stern
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=2023101155-unframed-satirical-f7ec@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=erosca@de.adit-jv.com \
--cc=hgajjar@de.adit-jv.com \
--cc=jinpu.wang@ionos.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=stern@rowland.harvard.edu \
--cc=yangyingliang@huawei.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
all inboxes | Powered by JetHome®