STRUCT TB_CM_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 without tb->lock taken. optional. 🧹
  • suspend_noirq β€” connection manager specific suspend_noirq. 😴
  • resume_noirq β€” connection manager specific resume_noirq. πŸŒ…
  • suspend β€” connection manager specific suspend. πŸ’€
  • freeze_noirq β€” connection manager specific freeze_noirq. 🧊
  • thaw_noirq β€” connection manager specific thaw_noirq. πŸ”₯
  • complete β€” connection manager specific complete. βœ…
  • runtime_suspend β€” connection manager specific runtime_suspend. 😴
  • runtime_resume β€” connection manager specific runtime_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 USB4 NVM_AUTH router operation. πŸ“‘

🌈 SEE ALSO 🌈

Kernel file: ./drivers/thunderbolt/tb.h β€” and the whole reference squad is right here, bestie:

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