xhci_port_is_tunneled(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

xhci_port_is_tunneled β€” check if a USB3 connection is tunneled over USB4. We're in the Kernel API Manual, section 9, bestie, and this one is lowkey iconic πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

enum usb_link_tunnel_mode xhci_port_is_tunneled (struct xhci_hcd *xhci ,
struct xhci_port *port );

πŸŽ€ ARGUMENTS πŸŽ€

  • xhci β€” the xhci host controller. That's the main-character struct here πŸ‘‘
  • port β€” the USB3 port to be checked. Gotta know which port we're vibe-checking πŸ”

🌸 DESCRIPTION 🌸

Okay so some hosts can detect whether a USB3 connection is native USB3 or tunneled over USB4. Intel hosts expose this via vendor specific extended capability 206 eSS PORT registers TUNEN (tunnel enabled) bit. Not me memorizing the exact capability number, but yes, 206, periodt πŸ’€

A USB3 device must be connected to the port to detect the tunnel. No device plugged in? No tunnel detection, fr fr πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

It returns a link tunnel mode enum:

  • USB_LINK_UNKNOWN β€” when the host is incapable of detecting USB3 over USB4 tunnels 😭
  • USB_LINK_NATIVE or USB_LINK_TUNNELED β€” otherwise, bestie, slay ✨

🌈 SEE ALSO 🌈

Kernel file ./drivers/usb/host/xhci-hub.c and xhci_port_state_to_neutral(9) β€” go read those too, iykyk 🫢


mwah πŸ’‹ this cutie lives under ./drivers/usb/host, dated October 2026, and it's serving full xhci_port_is_tunneled(9) energy in the Kernel API Manual. bye bestie, go check those tunnels πŸ’–

πŸ“¦ where this page comes from