All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Kean Ren <rh_king@163.com>
Cc: 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: Thu, 24 Sep 2026 02:06:12 +0000	[thread overview]
Message-ID: <arSByjrfc4e9fUr1@vbox> (raw)
In-Reply-To: <20260920025308.2358862-2-rh_king@163.com>

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.
> 
> 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 should be handled as a controller-specific quirk and not by
relaxing the generic USB core parsing.

BR,
Thinh

  reply	other threads:[~2026-09-24  2:06 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 [this message]
2026-09-25 10:19     ` Michal Pecio
2026-09-26  1:45       ` Thinh Nguyen
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=arSByjrfc4e9fUr1@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=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.