From: Greg KH <gregkh@linuxfoundation.org>
To: "jay.chen" <shawn2000100@gmail.com>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: Set avg_trb_len = 8 for EP0 during Address Device Command
Date: Wed, 14 May 2025 16:44:51 +0200 [thread overview]
Message-ID: <2025051444-among-posh-afcb@gregkh> (raw)
In-Reply-To: <20250514134011.16285-1-shawn2000100@gmail.com>
On Wed, May 14, 2025 at 09:40:08PM +0800, jay.chen wrote:
> According to the xHCI 1.2 spec (Section 6.2.3, p.454), the Average
> TRB Length (avg_trb_len) for control endpoints should be set to 8.
>
> Currently, during the Address Device Command, EP0's avg_trb_len remains 0,
> which may cause some xHCI hardware to reject the Input Context, resulting
> in device enumeration failures. In extreme cases, using a zero avg_trb_len
> in calculations may lead to division-by-zero errors and unexpected system
> crashes.
>
> This patch sets avg_trb_len to 8 for EP0 in
> xhci_setup_addressable_virt_dev(), ensuring compliance with the spec
> and improving compatibility across various host controller implementations.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=220033
> Signed-off-by: jay.chen <shawn2000100@gmail.com>
Please use your name, not your email alias.
And as you are now using a gmail account, please set the "From:" line at
the top of the patch properly as is documented. Please work with others
at your company that know how to do all of this if you have questions.
Also, this is a v2 patch, so always document what changed to warrant a
new version.
thanks,
greg k-h
next prev parent reply other threads:[~2025-05-14 14:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 13:40 [PATCH] usb: xhci: Set avg_trb_len = 8 for EP0 during Address Device Command jay.chen
2025-05-14 14:44 ` Greg KH [this message]
2025-05-16 3:41 ` 陳子潔
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=2025051444-among-posh-afcb@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=shawn2000100@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