aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/thunderbolt
Commit message (Collapse)AuthorAgeFilesLines
* thunderbolt: Remove PNP infoAymeric Wibo47 hours2-4/+0
| | | | | | | | | | So it isn't matched by devmatch(8) and automatically loaded. The PNP info will be readded once the USB4 driver is more complete. PR: 290827 Reported by: fuz, Marco Siedentopf <siedentm@me.com> Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) Sponsored by: The FreeBSD Foundation
* tb_pci: Don't try to attach to PCI buses that aren't below a PCI-PCI brigeJohn Baldwin2025-11-031-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | This driver is a subclass of the normal PCI bus driver that is intended to be used for the logical child bus of a Thunderbolt PCI-PCI bridge device. To determine if a given PCI bus's parent is a TB bridge, it examines the PCI device IDs of the parent pcibX device. However, this only works for pcibX devices that are actual PCI-PCI bridges and panics for PCI buses that are children of host bridges such as the pci0 child of pcib0. Probably this should not be reading device IDs (as that doesn't tell you if the device driver for the PCI-PCI bridge is actually a TB driver). Instead, the TB PCI-PCI driver should be exporting a new IVAR (with a globally unique number as we do for ACPI handles) that returns the TB generation and the probe routine for this PCI bus driver should be checking for that IVAR (the way acpi_pci.c checks for the presence of an ACPI handle). This fixes a panic on boot if tb.ko is loaded at boot time (which the driver recommends for certain chipsets). Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53202
* nhi: Fix a race with interrupt teardown during detachJohn Baldwin2025-10-293-3/+9
| | | | | | | | | | | | | | | | When nhi fails to attach on one of my systems (X1 Carbon 6th gen), an interrupt races with the teardown code such that the rings have been freed by nhi_detach() before an interrupt triggers. At the time of the crash, the thread invoking nhi_attach() is blocked in bus_teardown_intr() from nhi_pci_free() waiting for the interrupt thread to finish executing the handler. To fix, don't just disable the interrupts in nhi_detach(), but actually tear the handlers down and disable MSI-X before freeing the rings. Reviewed by: obiwac Differential Revision: https://reviews.freebsd.org/D53201
* thunderbolt: Import USB4 codeAymeric Wibo2025-09-2721-0/+6286
Add initial USB4 code written by Scott Long and originally passed on to HPS (source: https://github.com/hselasky/usb4), minus the ICM code and with some small fixes. For context, older TB chips implemented the connection manager in firmware (ICM) instead of in the OS (HCM), but maintaining the ICM code would be a huge burden for not many chips. Mostly completed work: - Debug/trace framework. - NHI controller driver. - PCIe bridge driver. - Router and config space layer handling (just reading in this commit). Link to the email where Scott shared details about the initial USB4 work: https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003411.html Glanced at by: emaste, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49450 Event: EuroBSDcon 2025