STRUCT TB_CM_OPS(9)
okay bestie, welcome to struct tb_cm_ops(9) from the Kernel API Manual β this is the connection manager specific operations vector, and it's genuinely giving βthe backstage crewβ energy. π
β¨
π NAME π
struct tb_cm_ops β Connection manager specific operations vector. that's the vibe, no cap. π«Ά
β¨ SYNOPSIS β¨
here's the struct in its full iconic form β signatures stay exactly as written, bestie, don't freestyle them:
struct tb_cm_ops {
int (*driver_ready)(struct tb *tb);
int (*start)(struct tb *tb, bool reset);
void (*stop)(struct tb *tb);
void (*deinit)(struct tb *tb);
int (*suspend_noirq)(struct tb *tb);
int (*resume_noirq)(struct tb *tb);
int (*suspend)(struct tb *tb);
int (*freeze_noirq)(struct tb *tb);
int (*thaw_noirq)(struct tb *tb);
void (*complete)(struct tb *tb);
int (*runtime_suspend)(struct tb *tb);
int (*runtime_resume)(struct tb *tb);
int (*runtime_suspend_switch)(struct tb_switch *sw);
int (*runtime_resume_switch)(struct tb_switch *sw);
void (*handle_event)(struct tb *tb, enum tb_cfg_pkg_type, const void
*buf, size_t size);
int (*get_boot_acl)(struct tb *tb, uuid_t *uuids, size_t nuuids);
int (*set_boot_acl)(struct tb *tb, const uuid_t *uuids, size_t
nuuids);
int (*disapprove_switch)(struct tb *tb, struct tb_switch *sw);
int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
const u8 *challenge, u8 *response);
int (*disconnect_pcie_paths)(struct tb *tb);
int (*approve_xdomain_paths)(struct tb *tb, struct tb_xdomain *xd,
int transmit_path, int transmit_ring, int receive_path, int
receive_ring);
int (*disconnect_xdomain_paths)(struct tb *tb, struct tb_xdomain
*xd, int transmit_path, int transmit_ring, int receive_path, int
receive_ring);
int (*usb4_switch_op)(struct tb_switch *sw, u16 opcode, u32
*metadata, u8 *status, const void *tx_data, size_t tx_data_len, void
*rx_data, size_t rx_data_len);
int (*usb4_switch_nvm_authenticate_status)(struct tb_switch *sw, u32
*status);
};
π Members π
okay so here's the member-by-member rundown β every function pointer gets its moment, and yes we're doing all of them:
driver_readyβ called right after the control channel is started. ICM uses it to send the driver ready message to the firmware. πstartβ starts the domain. go off. πstopβ stops the domain. and that's that. πdeinitβ does any cleanup after the domain is stopped but before it is unregistered. called withouttb->locktaken. optional. π§Ήsuspend_noirqβ connection manager specificsuspend_noirq. π΄resume_noirqβ connection manager specificresume_noirq. πsuspendβ connection manager specificsuspend. π€freeze_noirqβ connection manager specificfreeze_noirq. π§thaw_noirqβ connection manager specificthaw_noirq. π₯completeβ connection manager specificcomplete. βruntime_suspendβ connection manager specificruntime_suspend. π΄runtime_resumeβ connection manager specificruntime_resume. β°runtime_suspend_switchβ runtime suspends a switch. πruntime_resume_switchβ runtime resumes a switch. πhandle_eventβ handles a Thunderbolt event. β‘get_boot_aclβ gets the boot ACL list. πset_boot_aclβ sets the boot ACL list. βοΈdisapprove_switchβ disapproves a switch (disconnects the PCIe tunnel). π€approve_switchβ approves a switch. βadd_switch_keyβ adds a key to the switch. πchallenge_switch_keyβ challenges the switch using a key. π΅οΈdisconnect_pcie_pathsβ disconnects PCIe paths before an NVM update. πapprove_xdomain_pathsβ approves (establishes) XDomain DMA paths. π€disconnect_xdomain_pathsβ disconnects XDomain DMA paths. βοΈusb4_switch_opβ optional proxy for USB4 router operations. if it's set, it gets called whenever a USB4 router operation is performed. if it returns-EOPNOTSUPP, then the native USB4 router operation is called instead. π°οΈusb4_switch_nvm_authenticate_statusβ optional callback the CM implementation can use to return the status of the USB4NVM_AUTHrouter operation. π‘
π SEE ALSO π
Kernel file: ./drivers/thunderbolt/tb.h β and the whole reference squad is right here, bestie:
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 tb_port(9)struct usb4_port(9)struct tb_retimer(9)struct tb_path_hop(9)enum tb_path_port(9)struct tb_path(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)
byeee π this page is from the ./drivers/thunderbolt source, dated October 2026, and it's all struct tb_cm_ops(9) β periodt. πΈ
π¦ 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