STRUCT TB_NHI_OPS(9)
π struct tb_nhi_ops(9) π
okay so bestie, welcome to the Kernel API Manual entry for struct tb_nhi_ops β and yes, that (9) means it's a kernel-internals girlie, section 9, we're deep in the guts of the thing. this is the NHI-specific optional operations struct, and honestly? it's giving "plugin board of function pointers" and i'm obsessed. β¨
πΈ NAME πΈ
struct tb_nhi_ops β NHI specific optional operations π
π SYNOPSIS π
here's the whole struct, bestie, copied exactly so you can vibe-check every single member pointer:
struct tb_nhi_ops {
int (*init)(struct tb_nhi *nhi);
int (*suspend_noirq)(struct tb_nhi *nhi, bool wakeup);
int (*resume_noirq)(struct tb_nhi *nhi);
int (*runtime_suspend)(struct tb_nhi *nhi);
int (*runtime_resume)(struct tb_nhi *nhi);
void (*shutdown)(struct tb_nhi *nhi);
void (*pre_nvm_auth)(struct tb_nhi *nhi);
void (*post_nvm_auth)(struct tb_nhi *nhi);
int (*request_ring_irq)(struct tb_ring *ring, bool no_suspend);
void (*release_ring_irq)(struct tb_ring *ring);
bool (*is_present)(struct tb_nhi *nhi);
int (*init_interrupts)(struct tb_nhi *nhi);
};
twelve function pointers. twelve. she's thorough and we respect it π«Ά
π¦ Members π¦
okay let's go through them one by one, no skipping, no cap:
initβ NHI specific initialization. the little "hey wake up, get ready" moment for the NHI. πsuspend_noirqβ NHI specificsuspend_noirqhook. takes thenhiand awakeupbool, because context matters, obviously.resume_noirqβ NHI specificresume_noirqhook. the comeback era. π«runtime_suspendβ NHI specificruntime_suspendhook. nap time, but make it runtime.runtime_resumeβ NHI specificruntime_resumehook. nap's over, back to main character energy. πshutdownβ NHI specific shutdown. returnsvoidβ she just leaves, no notes. πpre_nvm_authβ hook to run before Thunderbolt 3 NVM authentication. the pre-game. β¨post_nvm_authβ hook to run after Thunderbolt 3 NVM authentication. the after-party. πrequest_ring_irqβ NHI specific interrupt retrieval hook. grabs an irq for astruct tb_ring *ring, and there's abool no_suspendin there too, so mind that. π₯release_ring_irqβ NHI specific interrupt release hook. gives the irq back for thatstruct tb_ring *ring, very "borrowed your hoodie, returning it washed" of her. π§is_presentβ Whether the device is currently present on the parent bus. returnsbool, so it's a simple yes/no, iykyk. π¦init_interruptsβ NHI specific interrupt initialization hook. last one and she ate. π
π SEE ALSO π
- Kernel file
./drivers/thunderbolt/nhi.hβ go read it, bestie, that's where the real lore lives π
fr fr, this is a struct of optional hooks β every member here is a function pointer the NHI can supply, so don't go assuming any of them are mandatory. the manpage doesn't say they're all populated and neither will i π
and that's the page! brought to you by the fine folks in ./drivers/thunderbolt, dated October 2026 β mwah, love u, go read nhi.h ππ
π¦ 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