STRUCT TB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

Okay so, bestie, this is the struct tb(9) page from the Kernel API Manual β€” and it's literally the main thunderbolt bus structure. Main character energy, no cap. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Here's the whole struct in all its glory, fr fr β€” every field accounted for and copied exactly:

struct tb {
    struct device dev;
    struct mutex lock;
    struct tb_nhi *nhi;
    struct tb_ctl *ctl;
    struct workqueue_struct *wq;
    struct tb_switch *root_switch;
    const struct tb_cm_ops *cm_ops;
    int index;
    enum tb_security_level security_level;
    size_t nboot_acl;
    unsigned long privdata[];
};

πŸŽ€ Members πŸŽ€

Now let's do a vibe check on each member, because every single one matters:

  • dev β€” domain device. It's giving core device representation, periodt.
  • lock β€” the Big lock. Must be held when accessing any struct tb_switch / struct tb_port. Respect the lock, bestie. πŸ”’
  • nhi β€” pointer to the NHI structure.
  • ctl β€” control channel for this domain.
  • wq β€” ordered workqueue for all domain specific work.
  • root_switch β€” root switch of this domain.
  • cm_ops β€” connection manager specific operations vector.
  • index β€” Linux assigned domain number.
  • security_level β€” current security level.
  • nboot_acl β€” number of boot ACLs the domain supports.
  • privdata β€” private connection manager specific data.

πŸ’… SEE ALSO πŸ’…

Go be nosy in these, bestie β€” Kernel file ./include/linux/thunderbolt.h and all these cross-refs:

  • enum tb_security_level(9)
  • struct tb_property_dir(9)
  • struct tb_property(9)
  • enum tb_link_width(9)
  • struct tb_xdomain(9)
  • struct tb_protocol_handler(9)
  • struct tb_service(9)
  • struct tb_service_driver(9)
  • struct tb_nhi(9)
  • struct tb_ring(9)
  • enum ring_desc_flags(9)
  • struct ring_frame(9)
  • tb_ring_rx(9)
  • tb_ring_tx(9)
  • tb_ring_dma_device(9)

Source/version: ./include/linux Β· date: October 2026 β€” that's the footer, and we're closing it out with a little sparkle. Bye bestie, go hold that lock πŸ’–βœ¨

πŸ“¦ where this page comes from