<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/thunderbolt, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-05-18T18:52:39Z</updated>
<entry>
<title>sys: Use is_pci_device instead of checking device or devclass names</title>
<updated>2026-05-18T18:52:39Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2026-05-18T18:52:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c'/>
<id>urn:sha1:be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c</id>
<content type='text'>
Reviewed by:	bz, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D56998
</content>
</entry>
<entry>
<title>thunderbolt: make code -Wunused clean</title>
<updated>2026-05-16T01:00:36Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2026-02-26T08:06:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1836330791789f18d0c9f0a63322a7f33b373c5b'/>
<id>urn:sha1:1836330791789f18d0c9f0a63322a7f33b373c5b</id>
<content type='text'>
This change modifies code paths and uses `__diagused` to address `-Wunused`
issues that occur when `THUNDERBOLT_DEBUG` == `0`.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D55575
</content>
</entry>
<entry>
<title>thunderbolt: Fix typo in comment</title>
<updated>2026-05-09T17:47:30Z</updated>
<author>
<name>Aymeric Wibo</name>
<email>obiwac@FreeBSD.org</email>
</author>
<published>2026-05-09T17:22:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fdd7daa2318ed3177e2674b9a3d18d21e2035ee1'/>
<id>urn:sha1:fdd7daa2318ed3177e2674b9a3d18d21e2035ee1</id>
<content type='text'>
Reported by:	adrian
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>thunderbolt: Fix a typo in a source code comment</title>
<updated>2026-04-19T08:12:02Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2026-04-19T08:04:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=33e0180a306b9ed60df5eae1818c40ef65750525'/>
<id>urn:sha1:33e0180a306b9ed60df5eae1818c40ef65750525</id>
<content type='text'>
- s/Inititalize/Initialize/

MFC after:	3 days
</content>
</entry>
<entry>
<title>thunderbolt: Support generic USB4 NHIs</title>
<updated>2026-04-15T12:10:24Z</updated>
<author>
<name>Aymeric Wibo</name>
<email>obiwac@FreeBSD.org</email>
</author>
<published>2026-04-15T12:04:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bb36c457ea49d80ca3109ef25ca41a614f9738b8'/>
<id>urn:sha1:bb36c457ea49d80ca3109ef25ca41a614f9738b8</id>
<content type='text'>
Check a PCI device's class, subclass, and progif to figure out if it is
a USB4 NHI. nhi_identifiers is completely removed as only these generic
USB4 NHIs are supported anyway, and all remnants of ICM-supporting code
are removed too. All devices now use the HCM.

PR:             290827
Reviewed by:	jhb, ngie
Sponsored by:   The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D52861
</content>
</entry>
<entry>
<title>thunderbolt: Fix tb_pcib device matching to check PCI class</title>
<updated>2026-02-06T16:13:12Z</updated>
<author>
<name>Abdelkader Boudih</name>
<email>guest-seuros@FreeBSD.org</email>
</author>
<published>2026-02-06T16:12:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=067ad8b31bf68b6dcf1ad571746349ed88d63d00'/>
<id>urn:sha1:067ad8b31bf68b6dcf1ad571746349ed88d63d00</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>thunderbolt: Remove PNP info</title>
<updated>2025-12-15T23:23:35Z</updated>
<author>
<name>Aymeric Wibo</name>
<email>obiwac@FreeBSD.org</email>
</author>
<published>2025-12-15T23:14:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5bd839792b6a6afacb50f782b6013100b5ff9110'/>
<id>urn:sha1:5bd839792b6a6afacb50f782b6013100b5ff9110</id>
<content type='text'>
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 &lt;siedentm@me.com&gt;
Fixes:	2ed9833791f2 (thunderbolt: Import USB4 code)
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>tb_pci: Don't try to attach to PCI buses that aren't below a PCI-PCI brige</title>
<updated>2025-11-03T15:24:23Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-11-03T15:24:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b9efaeb87a8f9cfc0cd87076a8b314785d6e04d9'/>
<id>urn:sha1:b9efaeb87a8f9cfc0cd87076a8b314785d6e04d9</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>nhi: Fix a race with interrupt teardown during detach</title>
<updated>2025-10-29T18:56:17Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2025-10-29T18:56:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=561571d480679933287a6d21c6929c39a7963857'/>
<id>urn:sha1:561571d480679933287a6d21c6929c39a7963857</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>thunderbolt: Import USB4 code</title>
<updated>2025-09-27T17:13:13Z</updated>
<author>
<name>Aymeric Wibo</name>
<email>obiwac@FreeBSD.org</email>
</author>
<published>2025-09-27T11:50:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2ed9833791f28e14843ac813f90cb030e45948dc'/>
<id>urn:sha1:2ed9833791f28e14843ac813f90cb030e45948dc</id>
<content type='text'>
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
</content>
</entry>
</feed>
