Re: [PATCH] usb: core: hub: Re-guess ep0 maxpacket size on reset
From: Michal Pecio
Date: Thu Nov 05 2026 - 07:44:28 EST
On Thu, 5 Nov 2026 00:06:24 -0500, Alan Stern wrote:
> On Wed, Nov 04, 2026 at 06:36:03PM +0100, Michal Pecio wrote:
> > 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.
Pengfei believes that the current behavior has only existed since 2023,
so perhaps no device depends on it for enumeration yet. And proposed
reset matches initial enumeration, so it seems low risk.
> 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 guess a device can harcode enumeration, including the 2nd reset, as
fixed sequence. Or it may send 8-byte descriptors while in the default
state or when wLength=64. Not sure why it would do that, though.
> I don't know what other OSes do about this.
I tried W10 in QEMU with qemu-xhci host controller, the device was an
audio dongle with a HID function and bMaxPacketSize0=8 passed through.
I disconnected D- to get errors without port disconnection detected.
Windows doesn't seem to switch packet size back to 64, it only disables
non-default endpoints, checks port status, resets it, switches xHCI
device state to "default" and then reads 64 bytes of device descriptor.
This succeeds because host kernel has already configured proper packet
size by this time. Not sure what Windows would od if this hanged.
Later of course second reset, address device, normal enumeration.
Regards,
Michal