Skip to content

Add device links between tunneled USB3 devices and USB4 Host

Mathias Nyman linux-usb 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 6 repliesIn review
  2. v14 patches 10 repliesSuperseded

Changes in v2 from the cover letter

Create device link by default if xHC host is not capable of tunnel detection but the USB3 ports have tunnel capability reported in ACPI _DSD object

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4xhci: Add USB4 tunnel detection for USB3 devices on Intel hostsdrivers/usb/host/xhci-ext-caps.h drivers/usb/host/xhci-hub.c drivers/usb/host/xhci.c +1 more+48 -00 replies
2/4usb: Add tunnel_mode parameter to usb device structuredrivers/usb/host/xhci-hub.c drivers/usb/host/xhci.c drivers/usb/host/xhci.h +1 more+24 -80 replies
3/4usb: acpi: add device link between tunneled USB3 device and USB4 Host Interfacedrivers/usb/core/usb-acpi.c+53 -00 replies
4/4thunderbolt: Don't create device link from USB4 Host Interface to USB3 xHC hostdrivers/thunderbolt/acpi.c+10 -300 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchSaranya GopalMika WesterbergMario Limonciello
SeriesT-b
1/4
2/4
3/4
4/4T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] Add device links between tunneled USB3 devices and USB4 Host

The relationship between a USB4 Host Interface providing USB3 tunnels, and tunneled USB3 devices is not represented in device hierarchy.

This caused issues with power managment as devices may suspend and resume in incorrect order.
A device link between the USB4 Host Interface and the USB3 xHCI was originally added to solve this, preventing the USB4 Host Interface from suspending if the USB3 xHCI Host was still active.
This unfortunately also prevents USB4 Host Interface from suspending even if the USB3 xHCI Host is only serving native non-tunneled USB devices.

Improve the current powermanagement situation by creating device links directly from tunneled USB3 devices to the USB4 Host Interface they depend on instead of a device link between the hosts.
This way USB4 host may suspend when the last tunneled device is disconnected.

Intel xHCI hosts are capable of reporting if connected USB3 devices are tunneled via vendor specific capabilities.
Use this until a standard way is available.

v2:
Create device link by default if xHC host is not capable of tunnel detection but the USB3 ports have tunnel capability reported in ACPI _DSD object

Mathias Nyman (4):
xhci: Add USB4 tunnel detection for USB3 devices on Intel hosts
usb: Add tunnel_mode parameter to usb device structure
usb: acpi: add device link between tunneled USB3 device and USB4 Host
Interface
thunderbolt: Don't create device link from USB4 Host Interface to USB3
xHC host

 drivers/thunderbolt/acpi.c       | 40 ++++++------------------
 drivers/usb/core/usb-acpi.c      | 53 ++++++++++++++++++++++++++++++++
 drivers/usb/host/xhci-ext-caps.h |  5 +++
 drivers/usb/host/xhci-hub.c      | 36 ++++++++++++++++++++++
 drivers/usb/host/xhci.c          | 14 +++++++++
 drivers/usb/host/xhci.h          |  3 +-
 include/linux/usb.h              |  8 +++++
 7 files changed, 128 insertions(+), 31 deletions(-)
Signature · 1 line
2.25.1