usb4_pci_po...ncapsulation(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

usb4_pci_port_set_ext_encapsulation β€” the little function that turns extended encapsulation on or off, bestie. That's the whole vibe check. ✨


✨ SYNOPSIS ✨

int usb4_pci_port_set_ext_encapsulation (struct tb_port *port , bool enable );

okay so it takes two things and gives you back an int, that's it, that's the whole signature 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • port β€” the PCIe adapter πŸ¦‹ like, the actual port object you're doing this to, not a vibe, a real struct tb_port *.
  • enable β€” flip it on or flip it off. true = extended encapsulation is happening, false = it's not. That's the bool, she's simple and she's iconic. πŸ’…

🌸 DESCRIPTION 🌸

So what does this do? It enables or disables extended encapsulation, which is the thing used in PCIe tunneling. Lowkey important stuff. πŸ”₯

But here's the part you cannot skip, bestie, and I mean it:

The caller needs to make sure both adapters support this before enabling. Both of them. Not one. Both. 😭 This function is not out here doing that check for you β€” that's your job, not hers.

🌈 RETURN 🌈

  • 0 on success β€” we love a clean exit, no notes πŸ‘‘
  • a negative errno otherwise β€” so like, if it didn't work, it's telling you why in errno form πŸ’€ always check it, fr fr

πŸ’– SEE ALSO πŸ’–

Everything lives in the Kernel file ./drivers/thunderbolt/usb4.c, and here is the full friend group, not one of them left out, no cap:

usb4_switch_check_wakes(9)
usb4_switch_setup(9)
usb4_switch_configuration_valid(9)
usb4_switch_read_uid(9)
usb4_switch_drom_read(9)
usb4_switch_lane_bonding_possible(9)
usb4_switch_set_wake(9)
usb4_switch_set_sleep(9)
usb4_switch_nvm_sector_size(9)
usb4_switch_nvm_read(9)
usb4_switch_nvm_set_offset(9)
usb4_switch_nvm_write(9)
usb4_switch_nvm_authenticate(9)
usb4_switch_nvm_authenticate_status(9)
usb4_switch_credits_init(9)
usb4_switch_query_dp_resource(9)
usb4_switch_alloc_dp_resource(9)
usb4_switch_dealloc_dp_resource(9)
usb4_port_index(9)
usb4_switch_map_pcie_down(9)
usb4_switch_map_usb3_down(9)
usb4_switch_add_ports(9)
usb4_switch_remove_ports(9)
usb4_port_unlock(9)
usb4_port_hotplug_enable(9)
usb4_port_reset(9)
usb4_port_configure(9)
usb4_port_unconfigure(9)
usb4_port_configure_xdomain(9)
usb4_port_unconfigure_xdomain(9)
usb4_port_sb_read(9)
usb4_port_sb_write(9)
usb4_port_router_offline(9)
usb4_port_router_online(9)
usb4_port_enumerate_retimers(9)
usb4_port_clx_supported(9)
usb4_port_asym_supported(9)
usb4_port_asym_set_link_width(9)
usb4_port_asym_start(9)
usb4_port_margining_caps(9)
usb4_port_hw_margin(9)
usb4_port_sw_margin(9)
usb4_port_sw_margin_errors(9)
usb4_port_retimer_set_inbound_sbtx(9)
usb4_port_retimer_unset_inbound_sbtx(9)
usb4_port_retimer_is_last(9)
usb4_port_retimer_is_cable(9)
usb4_port_retimer_nvm_sector_size(9)
usb4_port_retimer_nvm_set_offset(9)
usb4_port_retimer_nvm_write(9)
usb4_port_retimer_nvm_authenticate(9)
usb4_port_retimer_nvm_authenticate_status(9)
usb4_port_retimer_nvm_read(9)
usb4_usb3_port_max_link_rate(9)
usb4_usb3_port_allocated_bandwidth(9)
usb4_usb3_port_allocate_bandwidth(9)
usb4_usb3_port_release_bandwidth(9)
usb4_dp_port_set_cm_id(9)
usb4_dp_port_bandwidth_mode_supported(9)
usb4_dp_port_bandwidth_mode_enabled(9)
usb4_dp_port_set_cm_bandwidth_mode_supported(9)
usb4_dp_port_group_id(9)
usb4_dp_port_set_group_id(9)
usb4_dp_port_nrd(9)
usb4_dp_port_set_nrd(9)
usb4_dp_port_granularity(9)
usb4_dp_port_set_granularity(9)
usb4_dp_port_set_estimated_bandwidth(9)
usb4_dp_port_allocated_bandwidth(9)
usb4_dp_port_allocate_bandwidth(9)
usb4_dp_port_requested_bandwidth(9)
usb4_pci_port_ltssm_state(9)

like, that is a whole roster and every single one ate. go read them, iykyk πŸ“šβœ¨


πŸ’œ and that's the page, bestie πŸ’œ this one came out of the Kernel API Manual, lives under ./drivers/thunderbolt, and it's dated October 2026 β€” so go forth, check that both adapters support extended encapsulation first, and slay πŸŽ€πŸ«ΆπŸ’–

πŸ“¦ where this page comes from