In particular, don't try to probe PCI buses that are children of host
bridges such as the pci0 child of pcib0. This fixes a panic on boot
if tb.ko is loaded at boot time (which the driver recommends for
certain chipsets).
Details
- Reviewers
obiwac
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 67920 Build 64803: arc lint + arc unit
Event Timeline
The panic is that it tries to do pci_get_vendor() on pcib0 (child of acpi0) and that isn't a valid IVAR and the accessor panics. In particular, note that this driver is expecting to call tb_pcib_find_ident on its parent, and tb_pcib_find_ident assumes the device it is operating on is a PCI device with a device ID, etc. That isn't true for host bridges that are children of ACPI or OFW, etc.
Also, FWIW, this just fixes a panic when the probe routine runs against pci0 on my laptop. Later when the driver tries to attach to the actual Thunderbolt slots in my laptop it panics in a different way (the attach still fails as it does post-boot, and I get a different form of a race with the interrupt handler that still results in an interrupt handler raising a GPF, presumably due to dereferencing freed memory field with 0xdeadc0de as in the other review),