mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: aiyengar1990@gmail.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mathias Nyman <mathias.nyman@intel.com>,
	Chen-Yu Tsai <wenst@chromium.org>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v5 1/2] usb: core: Pair ports of different hubs through their connector
Date: Wed, 18 Nov 2026 10:11:27 -0500	[thread overview]
Message-ID: <56075489-e1fe-45a1-a282-4cd0214b9b16@rowland.harvard.edu> (raw)
In-Reply-To: <20261118-usb-port-pairing-v5-1-5f1a26789270@gmail.com>

On Wed, Nov 18, 2026 at 04:34:58AM +0000, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
> 
> On the RK3588, USB 3.0 host 2 is SuperSpeed-only and its connector's
> USB 2.0 lines go to a separate EHCI, so pairing by port number gives the
> SuperSpeed port a dead USB 2.0 peer.
> 
> When ports 0 (USB 2.0) and 1 (SuperSpeed) of a usb-connector graph lead
> to different hubs, pair them through the connector. Root hub ports are
> found by the controller port number; graphs in the dwc3 numbering don't
> match and keep today's pairing. connect_type is looked up the same way,
> so such a SuperSpeed port reads "hotplug".
> 
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
>  drivers/usb/core/hub.h  |  2 ++
>  drivers/usb/core/of.c   | 87 +++++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/usb/core/port.c | 70 ++++++++++++++++++++++++++++++++++++---
>  include/linux/usb/of.h  |  8 +++++
>  4 files changed, 162 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h
> index 9ebc5ef54a32..a186c41bdb5e 100644
> --- a/drivers/usb/core/hub.h
> +++ b/drivers/usb/core/hub.h
> @@ -97,6 +97,7 @@ struct usb_hub {
>   * @usb3_lpm_u2_permit: whether USB3 U2 LPM is permitted.
>   * @early_stop: whether port initialization will be stopped earlier.
>   * @ignore_event: whether events of the port are ignored.
> + * @connector_peer: peer found through a connector.
>   */
>  struct usb_port {
>  	struct usb_device *child;
> @@ -118,6 +119,7 @@ struct usb_port {
>  	unsigned int is_superspeed:1;
>  	unsigned int usb3_lpm_u1_permit:1;
>  	unsigned int usb3_lpm_u2_permit:1;
> +	bool connector_peer;
>  };

Minor point: It looks silly to see a standalone bool field immediately 
after a bunch of single-bit fields.  The new connector_peer field should 
also be a single bit, to match the others.

Alan Stern

  reply	other threads:[~2026-11-18 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  4:34 [PATCH v5 0/2] usb: core: Pair ports of different host controllers " Arun Iyengar via B4 Relay
2026-11-18  4:34 ` [PATCH v5 1/2] usb: core: Pair ports of different hubs " Arun Iyengar via B4 Relay
2026-11-18 15:11   ` Alan Stern [this message]
2026-11-18  4:34 ` [PATCH v5 2/2] usb: hub: Retry SuperSpeed for a device stuck on its USB 2.0 peer Arun Iyengar via B4 Relay

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=56075489-e1fe-45a1-a282-4cd0214b9b16@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=aiyengar1990@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=robh@kernel.org \
    --cc=wenst@chromium.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®