xhci: Add USB4 tunnel detection for USB3 devices on Intel hosts
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 30 Aug 2024 15:26:27 +0000 (18:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2024 07:54:39 +0000 (09:54 +0200)
commit948ce83fbb7df85bc930a5c0d6b133481be05c0b
tree11da3ebcb050f24d9acd7f110e30d69b5d86aa17
parent9299f12c20d4dc51d3b548392e1725da37cada48
xhci: Add USB4 tunnel detection for USB3 devices on Intel hosts

Knowledge about tunneled devices is useful in order to correctly describe
the relationship between tunneled USB3 device and USB4 Host Interface,
ensuring proper suspend and resume order, and to be able to power down
Thunderbolt if there is no need for tunneling.

Intel hosts share if a USB3 connection is native or tunneled via vendor
specific "SPR eSS PORT" registers.

These vendor registers are available if host supports a vendor specific
SPR shadow extended capability with ID 206. Registers are per USB3 port
and 0x20 apart.

Knowing the tunneling status of the device connected to roothub is enough
as all its children will have the same status.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240830152630.3943215-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ext-caps.h
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h