From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Michal Pecio <michal.pecio@gmail.com>
Cc: Kean Ren <rh_king@163.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@intel.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Griffin Kroah-Hartman <griffin@kroah.com>,
Kuen-Han Tsai <khtsai@google.com>, Kees Cook <kees@kernel.org>,
Nikhil Solanke <nikhilsolanke5@gmail.com>,
Thorsten Blum <blum@kernel.org>
Subject: Re: [PATCH 1/2] usb: core: hub: recognise two-lane SuperSpeed sublinks as Gen 1x2
Date: Sat, 26 Sep 2026 01:45:12 +0000 [thread overview]
Message-ID: <arcgGoi9Ev_GSkDR@vbox> (raw)
In-Reply-To: <20260925121902.3d75df9b.michal.pecio@gmail.com>
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@163.com>
> >
> >
> > 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@mail.gmail.com/
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@synopsys.com/
The same workaround also resolved a later speed-reporting issue:
https://bugzilla.kernel.org/show_bug.cgi?id=218943
BR,
Thinh
next prev parent reply other threads:[~2026-09-26 3:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-20 2:52 [PATCH 0/2] usb: fix ASM3242 reporting SuperSpeed for a Gen 2x2 link Kean Ren
2026-09-20 2:52 ` [PATCH 1/2] usb: core: hub: recognise two-lane SuperSpeed sublinks as Gen 1x2 Kean Ren
2026-09-24 2:06 ` Thinh Nguyen
2026-09-25 10:19 ` Michal Pecio
2026-09-26 1:45 ` Thinh Nguyen [this message]
2026-09-20 2:52 ` [PATCH 2/2] xhci: fix ASM3242 port speed report for Gen 2x2 links after cold boot Kean Ren
2026-09-25 10:12 ` 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=arcgGoi9Ev_GSkDR@vbox \
--to=thinh.nguyen@synopsys.com \
--cc=blum@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=griffin@kroah.com \
--cc=kees@kernel.org \
--cc=khtsai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=michal.pecio@gmail.com \
--cc=nikhilsolanke5@gmail.com \
--cc=rh_king@163.com \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.