STRUCT ICM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct icm β€” the Internal connection manager private data, bestie. That's the whole vibe. This is from the struct icm(9) page in the Kernel API Manual, and honestly? It's giving "private data, do not perceive me" energy.


✨ SYNOPSIS ✨

struct icm {
    struct mutex request_lock;
    struct delayed_work rescan_work;
    struct pci_dev *upstream_port;
    int vnd_cap;
    bool safe_mode;
    size_t max_boot_acl;
    bool rpm;
    bool can_upgrade_nvm;
    u8 proto_version;
    struct usb4_switch_nvm_auth *last_nvm_auth;
    bool veto;
    bool (*is_supported)(struct tb *tb);
    int (*cio_reset)(struct tb *tb);
    int (*get_mode)(struct tb *tb);
    int (*get_route)(struct tb *tb, u8 link, u8 depth, u64 *route);
    void (*save_devices)(struct tb *tb);
    int (*driver_ready)(struct tb *tb, enum tb_security_level *security_level, u8 *proto_version, size_t *nboot_acl, bool *rpm);
    void (*set_uuid)(struct tb *tb);
    void (*device_connected)(struct tb *tb, const struct icm_pkg_header *hdr);
    void (*device_disconnected)(struct tb *tb, const struct icm_pkg_header *hdr);
    void (*xdomain_connected)(struct tb *tb, const struct icm_pkg_header *hdr);
    void (*xdomain_disconnected)(struct tb *tb, const struct icm_pkg_header *hdr);
    void (*rtd3_veto)(struct tb *tb, const struct icm_pkg_header *hdr);
 };

πŸ’… Members

Okay so let's go through every single one, no skipping, we're doing the full tour πŸŽ€

  • request_lock β€” a struct mutex that makes sure only one message is send to ICM at time. One at a time, babe. Patience is a virtue.
  • rescan_work β€” a struct delayed_work, the work used to rescan the surviving switches after resume. "surviving" is doing so much heavy lifting in that sentence ngl πŸ’€
  • upstream_port β€” pointer to the PCIe upstream port this host controller is connected to. Lowkey exclusive: this is only set for systems where ICM needs to be started manually.
  • vnd_cap β€” the Vendor defined capability where the PCIe2CIO mailbox resides. And only set when upstream_port is not NULL β€” they're a package deal, iykyk.
  • safe_mode β€” tells you if ICM is in safe mode. Be safe out there 🫢
  • max_boot_acl β€” the Maximum number of preboot ACL entries (0 if not supported). Zero means we don't do that here.
  • rpm β€” does the controller support runtime PM (RTD3)? Simple yes/no, icon behavior.
  • can_upgrade_nvm β€” can the NVM firmware be upgrade on this controller? (Yes, the language is exactly that, we don't gatekeep ✨)
  • proto_version β€” the Firmware protocol version, a lil u8 doing its thing.
  • last_nvm_auth β€” the Last USB4 router NVM_AUTH result, a struct usb4_switch_nvm_auth * β€” or NULL if not set.
  • veto β€” is RTD3 veto in effect? Spicy.
  • is_supported β€” function pointer that checks if we can support ICM on this controller.
  • cio_reset β€” trigger CIO reset. Go off.
  • get_mode β€” read and return the ICM firmware mode. Note: optional πŸ‘‘
  • get_route β€” find a route string for given switch (u8 link, u8 depth, u64 *route).
  • save_devices β€” ask ICM to save devices to ACL when suspending. Optional, so don't come for it.
  • driver_ready β€” send driver ready message to ICM. Signature is a whole meal: enum tb_security_level *security_level, u8 *proto_version, size_t *nboot_acl, bool *rpm.
  • set_uuid β€” set UUID for the root switch. Optional πŸ’œ
  • device_connected β€” handle device connected ICM message.
  • device_disconnected β€” handle device disconnected ICM message.
  • xdomain_connected β€” handle XDomain connected ICM message.
  • xdomain_disconnected β€” handle XDomain disconnected ICM message.
  • rtd3_veto β€” handle RTD3 veto notification ICM message.

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/thunderbolt/icm.c
  • struct usb4_switch_nvm_auth(9)

That's the whole page, bestie, every last member accounted for β€” no cap πŸ’– This lil masterpiece comes to you from ./drivers/thunderbolt and it's dated October 2026, signed off on the struct icm(9) manual page. Slay, read responsibly, and go touch some firmware πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from