STRUCT TB_NHI(9)
π NAME π
okay so bestie, struct tb_nhi is the thunderbolt native host interface, and this whole page is the struct tb_nhi(9) manual page from the kernel API manual. no cap, it's lowkey iconic. β¨
π SYNOPSIS π
struct tb_nhi {
spinlock_t lock;
struct device *dev;
const struct tb_nhi_ops *ops;
void __iomem *iobase;
struct tb_ring **tx_rings;
struct tb_ring **rx_rings;
bool going_away;
bool iommu_dma_protection;
struct work_struct interrupt_work;
u32 hop_count;
unsigned long quirks;
struct completion domain_released;
bool host_reset;
};
πΈ Members πΈ
lockβ bestie, this spinlock must be held during ring creation/destruction. it is also acquired byinterrupt_workwhen dispatching interrupts to the individual rings. fr fr, it's the vibe-check bouncer for ring lifecycle. πdevβ the device associated with this NHI instance. it's giving main character energy for this little NHI world. π«Άopsβ NHI specific optional ops. optional? okay lowkey flexible, we love that. β¨iobaseβ MMIO space of the NHI. that's the literal hardware hangout spot. πtx_ringsβ all Tx rings available on this host controller. slay, transmit side is booked and busy. π₯rx_ringsβ all Rx rings available on this host controller. receive side is also thriving, periodt. πgoing_awayβ the host controller device is about to disappear π so when this flag is set, avoid touching the hardware anymore. like, do not poke the hardware when it's already leaving the group chat. πiommu_dma_protectionβ an IOMMU will isolate external-facing ports. protective queen behavior, honestly. π‘οΈβ¨interrupt_workβ work scheduled to handle ring interrupt when no MSI-X is used. it's the backup plan doing its little work moment. πhop_countβ number of rings (end point hops) supported by NHI. literally the ring headcount, iykyk. πquirksβ NHI specific quirks if any. every family has its little quirks, no cap. πdomain_releasedβ completed when domain has been fully released. the "we're so done here" completion, iconic. π¦host_resetβ Host router was reset on driver load, or forced on system shutdown/reboot. When set,tb_stopasserts DPR on connected downstream ports to signal disconnect before tearing down the router tree. Only Thunderbolt 3 devices are reset; USB4 routers are skipped. that's the whole rule, bestie, don't skip it. π
π SEE ALSO π
Kernel file ./include/linux/thunderbolt.h and the whole squad:
enum tb_security_level(9)struct tb(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_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 Β· manual page: struct tb_nhi(9) πΈπ«Άπ
π¦ 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