Re: [PATCH v2 1/3] usb: core: Fix root hub descriptor wBytesPerInterval

From: Mathias Nyman

Date: Wed May 06 2026 - 06:19:51 EST


On 5/4/26 12:13, Michal Pecio wrote:
Per USB3 9.6.7, it's "the total number of bytes this endpoint will
transfer every service interval". There seems to be no good reason
to have wBytesPerInterval < wMaxPacketSize - either one is too low
or the other too high. Here, wBytesPerInterval is too low for hubs
with more than 15 ports and xHCI spec allows such root hubs.


There shouldn't be a USB3 hub with more than 15 ports as
USB 3.x specification limits USB3 ports to 15.

See USB 3.2 section 10.15.2.1 Hub Descriptor
"bNbrPorts: Number of downstream facing ports that this hub supports. The
maximum number of ports of ports a hub can support is 15."


Hub driver also fails if hub has more than 15 ports.
hub.c hub_configure():

maxchild = USB_MAXCHILDREN;
if (hub_is_superspeed(hdev))
maxchild = min_t(unsigned, maxchild, USB_SS_MAXPORTS);

if (hub->descriptor->bNbrPorts > maxchild) {
message = "hub has too many ports!";
ret = -ENODEV;
goto fail;

ch11.h:#define USB_SS_MAXPORTS 15

The USB 3.2 specification 10.15.1 'Standard Descriptors for Hub Class' also
shows hardcoded values of '2' for both the wBytesPerInterval and wMaxPacketSize
for the hub interrupt endpoint.

Thanks
Mathias