STRUCT TB_PORT(9)
πΈ NAME πΈ
okay so bestie, welcome to struct tb_port(9) from the Kernel API Manual β this is literally a thunderbolt port, and itβs part of a tb_switch. iconic little kernel struct behavior, no cap. π
β¨ SYNOPSIS β¨
struct tb_port {
struct tb_regs_port_header config;
struct tb_switch *sw;
struct tb_port *remote;
struct tb_xdomain *xdomain;
int cap_phy;
int cap_tmu;
int cap_adap;
int cap_usb4;
struct usb4_port *usb4;
u8 port;
bool disabled;
bool bonded;
struct tb_port *dual_link_port;
u8 link_nr:1;
struct ida in_hopids;
struct ida out_hopids;
struct list_head list;
unsigned int total_credits;
unsigned int ctl_credits;
unsigned int dma_credits;
struct tb_bandwidth_group *group;
struct list_head group_list;
unsigned int max_bw;
bool redrive;
};
π Members π
configβ cached port configuration read from registers. πswβ the switch this port belongs to.remoteβ the remote port, orNULLif itβs not connected.xdomainβ the remote host, orNULLif itβs not connected.cap_phyβ offset, zero if not found.cap_tmuβ offset of the adapter-specific TMU capability, or0if not present.cap_adapβ offset of the adapter-specific capability, or0if not present.cap_usb4β offset to the USB4 port capability, or0if not present.usb4β pointer to the USB4 port structure, only ifcap_usb4is!= 0.portβ port number on the switch.disabledβ disabled by eeprom, or enabled but not implemented.bondedβtrueif the port is bonded (two lanes combined as one).dual_link_portβ if the switch is connected using two ports, this points to the other port.link_nrβ is this the primary or secondary port on thedual_link.in_hopidsβ currently allocated input HopIDs.out_hopidsβ currently allocated output HopIDs.listβ used to link ports to the DP resources list.total_creditsβ total number of buffers available for this port.ctl_creditsβ buffers reserved for the control path.dma_creditsβ number of credits allocated for DMA tunneling for all DMA paths through this port.groupβ bandwidth allocation group the adapter is assigned to. only used for DP IN adapters for now.group_listβ the adapter is linked to the groupβs list of ports through this.max_bwβ maximum possible bandwidth through this adapter if set to non-zero.redriveβ for DP IN, iftruethe adapter is in redrive mode.
π§ Description π§
In USB4 terminology, this structure represents an adapter β protocol or lane adapter. periodt. π¦
π SEE ALSO π
- Kernel file
./drivers/thunderbolt/tb.h struct tb_nvm(9)enum tb_switch_tmu_mode(9)struct tb_switch_tmu(9)struct tb_switch(9)struct tb_bandwidth_group(9)struct usb4_port(9)struct tb_retimer(9)struct tb_path_hop(9)enum tb_path_port(9)struct tb_path(9)struct tb_cm_ops(9)tb_upstream_port(9)tb_is_upstream_port(9)tb_port_has_remote(9)tb_domain_event(9)tb_switch_for_each_port(9)tb_switch_downstream_port(9)tb_switch_depth(9)tb_switch_is_icm(9)tb_switch_tmu_is_configured(9)tb_switch_tmu_is_enabled(9)tb_switch_clx_is_enabled(9)tb_port_path_direction_downstream(9)tb_for_each_port_on_path(9)tb_for_each_upstream_port_on_path(9)tb_path_for_each_hop(9)tb_downstream_route(9)tb_xdomain_downstream_port(9)usb4_switch_version(9)tb_switch_is_usb4(9)enum usb4_sb_target(9)enum usb4_margin_sw_error_counter(9)struct usb4_port_margining_params(9)
mwah π
β source ./drivers/thunderbolt, October 2026.
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms