STRUCT TB_CTL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct tb_ctl β€” Thunderbolt control channel

okay bestie, so this is the kernel API manual page for struct tb_ctl(9) and it's genuinely giving "the nervous system of your Thunderbolt port" energy β€” like, this struct is the control channel itself. no cap. ✨


πŸ’– NAME

struct tb_ctl β€” Thunderbolt control channel πŸŽ€


⚑ SYNOPSIS

struct tb_ctl {
    struct tb_nhi *nhi;
    struct tb_ring *tx;
    struct tb_ring *rx;
    struct dma_pool *frame_pool;
    struct ctl_pkg *rx_packets[TB_CTL_RX_PKG_COUNT];
    struct mutex request_queue_lock;
    struct list_head request_queue;
    bool running;
    int timeout_msec;
    event_cb callback;
    void *callback_data;
    int index;
 };

🌸 Members

okay so here's the cast of characters, main-character by main-character πŸ‘‘

  • nhi β€” pointer to the NHI structure. it's the link-up to the big boss, iykyk 🫢
  • tx β€” the transmit ring. this is where stuff leaves πŸ’…
  • rx β€” the receive ring. and this is where stuff arrives 🎁
  • frame_pool β€” DMA pool for control messages. lowkey the supply closet for control traffic ✨
  • rx_packets β€” received control messages. the whole inbox, literally πŸ“¬
  • request_queue_lock β€” lock protecting request_queue. it keeps the queue safe from chaos fr fr πŸ”’
  • request_queue β€” list of outstanding requests. everything still waiting on a reply lives here πŸ•°οΈ
  • running β€” is the control channel running at the moment. a yes/no vibe check on the whole operation ⭐
  • timeout_msec β€” default timeout for non-raw control messages. like "how long do we wait before we give up" energy, in milliseconds ⏳
  • callback β€” callback called when hotplug message is received. something shows up, this gets called, everybody finds out πŸ”₯
  • callback_data β€” data passed to callback. the little care package handed over with it πŸŽ€
  • index β€” domain number. this will be output with the trace record. so like, its name tag when the trace log snaps a pic of it πŸ“Έ

🌈 SEE ALSO

go read them all bestie, it's a whole friend group πŸ’œπŸ«Ά


that's the whole page, no notes πŸ’…

and finally, the cute sign-off β€” this one's from ./drivers/thunderbolt, dated October 2026. slay, periodt. πŸ§šπŸ’–πŸŒΈ

πŸ“¦ where this page comes from