Page MenuHomeFreeBSD

thunderbolt.4: Explain what driver does in manpage
ClosedPublic

Authored by obiwac on Fri, Jun 19, 3:16 PM.
Tags
None
Referenced Files
F160421885: D57668.id180101.diff
Wed, Jun 24, 7:42 AM
Unknown Object (File)
Tue, Jun 23, 1:32 PM
Unknown Object (File)
Tue, Jun 23, 7:48 AM
Unknown Object (File)
Tue, Jun 23, 7:08 AM
Unknown Object (File)
Tue, Jun 23, 2:50 AM
Unknown Object (File)
Tue, Jun 23, 2:32 AM
Unknown Object (File)
Tue, Jun 23, 12:44 AM
Unknown Object (File)
Sun, Jun 21, 12:52 PM
Subscribers

Details

Summary

The current manpage is a little lacking and could lead users to believe FreeBSD actually has USB4 support.

Test Plan
THUNDERBOLT(4)          FreeBSD Kernel Interfaces Manual          THUNDERBOLT(4)

NAME
     thunderbolt – Thunderbolt / USB4 Native Host Interface driver

SYNOPSIS
     device thunderbolt

DESCRIPTION
     The thunderbolt driver attaches to the Thunderbolt and Generic USB4 Native
     Host Interface (NHI) found on Intel and AMD platforms.  The NHI is the
     host-side controller that manages communication with Thunderbolt and USB4
     routers.

     The driver initializes the NHI hardware and can read from and write to its
     configuration space in order to suspend or resume it.

     This driver does not provide working Thunderbolt or USB4 support.  The
     primary purpose of loading this driver is to allow the system to assert
     ownership of the NHI device so that PCI power management can place it into
     a low-power state.  On platforms that support S0ix (such as S0i3), an
     unsuspended NHI will block entry into the deepest idle states, and the NHI
     is put in an active state by the pre-OS connection manager at boot.
     Loading thunderbolt prevents that blockage.  Users who do not require S0ix
     idle states have no need to load this driver for the time being.

HARDWARE
     The thunderbolt driver only attaches to generic USB4 controllers, that is
     devices matching PCI class PCIC_SERIALBUS, subclass PCIS_SERIALBUS_USB, and
     programming interface PCIP_SERIALBUS_USB_USB4.

HISTORY
     The thunderbolt driver appeared in FreeBSD 16.0.

CAVEATS
     This driver is under active development and is not feature-complete.  The
     interface and behaviour are subject to change without notice.  Do not rely
     on this driver for Thunderbolt or USB4 device connectivity.

FreeBSD 16.0-CURRENT              June 19, 2026                   THUNDERBOLT(4)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74019
Build 70902: arc lint + arc unit

Event Timeline

share/man/man4/thunderbolt.4
24

Should .Pp be added before this line to help highlight this point?

Thanks for doing this, this is a big improvement! Some of the description really belongs in CAVEATS, but that's okay.

Also, please move CAVEATS to the end, it is canonically the final section so to teach readers to always hit end and just see if anything's down there. mandoc -Tlint share/man/man4/thunderbolt.4 should complain about this.

share/man/man4/thunderbolt.4
24

i dont think so, (i do it all the time but) one paragraph sentences are detestable. oversimplification is a goal of release errata, but for reference manuals, if you cant read the second sentence of the introductory paragraph, you are not the target audience of reference manuals. I think this is very clear.

40

Please prepend a blank comment line before this for conformance with our style guides and consistency with C style comments.

44–53

We want to the Hardware Compatibility List to be accessible to a greater portion of people than just computer scientists. TBF I really do not want PCI classes listed in them at all, 97% of readers can not read this, which is bad.

Some of the description really belongs in CAVEATS, but that's okay.

yeah, but I feel like it's a big enough caveat that it warrants being in the main description

share/man/man4/thunderbolt.4
24

I don't mind either way. I will leave as is

44–53

well it is kinda relevant, because some thunderbolt/USB4 devices will not attach because they are not generic NHIs. And the only real way you can tell the difference is by class.

move CAVEATS to end, add blank comment before SPDX

obiwac retitled this revision from thunderbolt(4): Explain what driver does in manpage to thunderbolt.4: Explain what driver does in manpage.Fri, Jun 19, 7:00 PM
obiwac edited the test plan for this revision. (Show Details)
ziaee requested changes to this revision.Fri, Jun 19, 7:49 PM
ziaee added inline comments.
share/man/man4/thunderbolt.4
44–53

So, mention it, but please put the accessible information first.

This revision now requires changes to proceed.Fri, Jun 19, 7:49 PM
obiwac marked 4 inline comments as done.

improve accessibility of HARDWARE section

This revision is now accepted and ready to land.Fri, Jun 19, 8:17 PM