From: Alan Stern <stern@rowland.harvard.edu>
To: Michal Pecio <michal.pecio@gmail.com>
Cc: Pengfei Lv <lvpengfei20@huawei.com>,
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
xuhaiyang5@hisilicon.com, xuetao09@huawei.com,
caiyadong@huawei.com, suzhuangluan@hisilicon.com
Subject: Re: [PATCH] usb: core: hub: Re-guess ep0 maxpacket size on reset
Date: Thu, 5 Nov 2026 00:06:24 -0500 [thread overview]
Message-ID: <59b0cc88-9ac2-453b-bd68-56aa356c0fc0@rowland.harvard.edu> (raw)
In-Reply-To: <20261104183603.17d663ce.michal.pecio@gmail.com>
On Wed, Nov 04, 2026 at 06:36:03PM +0100, Michal Pecio wrote:
> On Wed, 4 Nov 2026 09:59:24 -0500, Alan Stern wrote:
> > On Wed, Nov 04, 2026 at 08:44:02PM +0800, Pengfei Lv wrote:
> > > When the subsequent re-enumeration then uses the "new scheme" and
> > > issues a 64-byte GET_DESCRIPTOR (get_bMaxPacketSize0 with size=64),
> > > xhci_check_maxpacket() sees hw==sw==8 and does not issue an Evaluate
> > > Context command. The xHC queues a Data TRB of length 64 but applies
> > > ep0 max_packet=8 for short-packet detection.
> >
> > That's exactly what we want it to do.
>
> Should we want it, though?
>
> Were there known devices with bMaxPacketSize0 <= 16 which required the
> whole transfer to complete before they are reset?
>
> That's not what happens in the initial iteration, so it seems any such
> devices would always take two iterations to begin working.
>
> Is this what the only correct Proprietary Operating System does?
I don't know offhand of any positive or negative examples. But if a
device was going to hang if it was asked for the remaining part of
the device descriptor after a non-initial reset, how would it ever get
through initialization? The procedure does two resets, and after the
second reset the device has to send the full descriptor.
I don't know what other OSes do about this.
Alan Stern
next prev parent reply other threads:[~2026-11-05 5:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 12:44 Pengfei Lv
2026-11-04 14:59 ` Alan Stern
2026-11-04 17:36 ` Michal Pecio
2026-11-05 5:06 ` Alan Stern [this message]
2026-11-05 12:30 ` Michal Pecio
2026-11-06 3:16 ` [PATCH v2] " Pengfei Lv
2026-11-06 7:17 ` Michal Pecio
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=59b0cc88-9ac2-453b-bd68-56aa356c0fc0@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=caiyadong@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lvpengfei20@huawei.com \
--cc=michal.pecio@gmail.com \
--cc=stable@vger.kernel.org \
--cc=suzhuangluan@hisilicon.com \
--cc=xuetao09@huawei.com \
--cc=xuhaiyang5@hisilicon.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®