Re: [PATCH 1/2] usb: core: hub: recognise two-lane SuperSpeed sublinks as Gen 1x2
From: Thinh Nguyen
Date: Fri Sep 25 2026 - 23:44:34 EST
On Fri, Sep 25, 2026, Michal Pecio wrote:
> On Thu, 24 Sep 2026 02:06:12 +0000, Thinh Nguyen wrote:
> > On Sun, Sep 20, 2026, Kean Ren wrote:
> > > get_port_ssp_rate() rejects every matching sublink speed attribute
> > > whose link protocol (LP) is not SuperSpeedPlus by jumping to the
> > > "unknown" exit before it looks at the number of active lanes.
> > >
> > > USB 3.2 Gen 1x2 runs two SuperSpeed (Gen 1) lanes, so the matching
> >
> > Gen 1x2 is SuperSpeed Plus and should use LP = SSP
> >
> > > sublink entry advertises LP = SuperSpeed while two lanes are in use.
> > > The current code therefore returns USB_SSP_GEN_UNKNOWN for such a
> > > link and the USB core falls back to USB_SPEED_SUPER, reporting 5000
> > > Mbps.
> > >
> > > Handle the two-lane cases before rejecting non-SuperSpeedPlus
> > > entries:
> > > >= 10 Gbps per lane and 2 lanes -> USB_SSP_GEN_2x2
> > > >= 5 Gbps per lane and 2 lanes -> USB_SSP_GEN_1x2
> > >
> > > so that a genuine Gen 1x2 link is reported as 10000 Mbps instead of
> > > 5000 Mbps.
>
> Was it tested with a genuine Gen 1x2 device? On which hub?
>
> > >
> > > Signed-off-by: Kean Ren <rh_king@xxxxxxx>
> >
> >
> > Gen 1x2 is a SuperSpeed Plus mode and should advertise LP =
> > USB_SSP_SUBLINK_SPEED_LP_SSP. A controller reporting Gen 1x2 with LP =
> > SuperSpeed is violating the expected encoding.
>
> This deals with the bmSublinkSpeedAttr array of hub BOS descriptor.
> For host controller root hubs it's generated by xhci-hub.c.
>
> And I think that the code which generates it already tries to avoid
> setting SS (non-P) in multi-lane speeds, so what triggers this bug?
>
FWIW, we've seen ASM3242 report incorrect speed information before.
Original report:
https://lore.kernel.org/all/CAKRa1U6rukBBwWx0vN2wqiHMbUH9zWsc-y1wknOCvhueqWsT7w@xxxxxxxxxxxxxx/
At the time, I suggested using the SSP sublink speed notification as a
workaround since the controller was advertising inconsistent speed
information:
https://lore.kernel.org/all/6908aa69-469b-8f92-8e19-60685f524f9c@xxxxxxxxxxxx/
The same workaround also resolved a later speed-reporting issue:
https://bugzilla.kernel.org/show_bug.cgi?id=218943
BR,
Thinh