HomeFreeBSD

thunderbolt: Fix tb_pcib device matching to check PCI class

Description

thunderbolt: Fix tb_pcib device matching to check PCI class

Light Ridge and earlier Thunderbolt controllers reuse the same device ID
(0x1513) for both the NHI (class 0x088000) and PCI bridges (class
0x060400).

Without checking the PCI class, tb_pcib would incorrectly match NHI
devices, causing a panic when trying to attach bridge code to non-bridge
hardware.

Add PCI class check to tb_pcib_find_ident() to only match actual PCI-PCI
bridges (PCIC_BRIDGE/PCIS_BRIDGE_PCI).

Reviewed by: obiwac, jhb
Approved by: obiwac, jhb
Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code)
Differential Revision: https://reviews.freebsd.org/D55102

Details

Provenance
seurosAuthored on Feb 6 2026, 4:12 PM
obiwacCommitted on Feb 6 2026, 4:13 PM
Reviewer
rG2ed9833791f2: thunderbolt: Import USB4 code
Differential Revision
D55102: thunderbolt: Fix tb_pcib device matching to check PCI class
Parents
rG86150ed98b79: bhyve: Simplify passthru_msix_addr()
Branches
Unknown
Tags
Unknown