mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/3] usb: core: Pair ports of different host controllers through their connector
@ 2026-11-19 10:03 Arun Iyengar via B4 Relay
  2026-11-19 10:03 ` [PATCH v6 1/3] usb: core: Pair ports of different hubs " Arun Iyengar via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-19 10:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern
  Cc: linux-usb, linux-kernel, Mathias Nyman, Chen-Yu Tsai,
	Rob Herring, Arun Iyengar

On the RK3588, the USB 2.0 lines of the USB 3.0 host 2 connector go to
a separate EHCI, so the USB core pairs its SuperSpeed port with the
wrong USB 2.0 port, and a USB 3 device present at boot stays at 480 Mb/s.

Patch 1 pairs the ports through their usb-connector. Patch 2 fixes the
connect_type of a dwc3 SuperSpeed port with a USB 2.0 device node. Patch
3 resets the USB 2.0 port of such a device once, so that it retries
SuperSpeed. The Orange Pi 5 DT follows separately and needs Chen-Yu
Tsai's usb-hcd binding [1].

Tested on an Orange Pi 5 (7.3-based kernel with KASAN): a USB 3 disk
that enumerated on the USB 2.0 port moved to 5 Gb/s in 3/3 boots, 6/6
xHCI rebinds and 2/2 runtime-suspended resets. With DT overlays: ports
whose connector peer is not a USB node are paired by default, and a
SuperSpeed port shaped like the lckfb one reads hotplug. Not tested with
an external USB 3 hub; a device that stays at high speed was tested on
v5 only.

Developed with Claude (Anthropic), which wrote the code and the commit
messages. I reviewed every change.

[1] https://lore.kernel.org/all/20261014082037.1774672-2-wenst@chromium.org/

---
Changes in v6:
- Patch 1: take a connector peer only if it is or is under a "usb" node
  (Sashiko)
- Patch 1: connector_peer as a :1 bitfield, set before the port is
  registered (Alan Stern, Sashiko)
- New patch 2: dwc3 SuperSpeed port connect_type from the graph first (Sashiko)
- Link to v5: https://patch.msgid.link/20261118-usb-port-pairing-v5-0-5f1a26789270@gmail.com

---
Arun Iyengar (3):
      usb: core: Pair ports of different hubs through their connector
      usb: core: Prefer the graph for a dwc3 SuperSpeed port's connect_type
      usb: hub: Retry SuperSpeed for a device stuck on its USB 2.0 peer

 drivers/usb/core/hub.c  | 158 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/core/hub.h  |   5 ++
 drivers/usb/core/of.c   | 148 ++++++++++++++++++++++++++++++++++++++++-----
 drivers/usb/core/port.c |  89 ++++++++++++++++++++++++---
 include/linux/usb/of.h  |  13 ++++
 5 files changed, 390 insertions(+), 23 deletions(-)
---
base-commit: f11fe7603df07fbb9fa02b0d385c1696c87a6dab
change-id: 20261110-usb-port-pairing-af0f66f0ab2e

Best regards,
--  
Arun Iyengar <aiyengar1990@gmail.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-19 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 10:03 [PATCH v6 0/3] usb: core: Pair ports of different host controllers through their connector Arun Iyengar via B4 Relay
2026-11-19 10:03 ` [PATCH v6 1/3] usb: core: Pair ports of different hubs " Arun Iyengar via B4 Relay
2026-11-19 10:03 ` [PATCH v6 2/3] usb: core: Prefer the graph for a dwc3 SuperSpeed port's connect_type Arun Iyengar via B4 Relay
2026-11-19 10:03 ` [PATCH v6 3/3] usb: hub: Retry SuperSpeed for a device stuck on its USB 2.0 peer Arun Iyengar via B4 Relay

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®