Page MenuHomeFreeBSD

xhci: Move xhci_pci_match to a header so it can be used from loader
AcceptedPublic

Authored by thj on Nov 25 2025, 3:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 26, 1:01 AM
Unknown Object (File)
Fri, Jan 16, 2:34 AM
Unknown Object (File)
Thu, Jan 15, 6:32 PM
Unknown Object (File)
Dec 19 2025, 8:52 AM
Unknown Object (File)
Dec 15 2025, 12:06 PM
Unknown Object (File)
Dec 12 2025, 5:03 AM
Unknown Object (File)
Nov 29 2025, 10:11 PM
Unknown Object (File)
Nov 28 2025, 12:23 AM
Subscribers

Details

Reviewers
emaste
aokblast
hrs
adrian
Group Reviewers
USB

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68839
Build 65722: arc lint + arc unit

Event Timeline

thj requested review of this revision.Nov 25 2025, 3:29 PM

Thanks! That lately was a source of conflict with the 2-3 commits that came in the last half year.
I still wonder if alternatively we put it into a C file on make in non-static; not sure if it is long-term more stable or if loader can easily link in another USB file?

Otherwise I am more than happy with this! :)

i'm ok with this; i would be putting it in a separate .c file instead because I dislike lots of code use like this in header files, bt that's just me. :-)

.. and since this is just effectively a table of { id, string } and you want to use it in other places, we can later just turn it into a table.

This revision is now accepted and ready to land.Nov 25 2025, 6:52 PM

So I'd like to see the loader patches too before this lands. This strikes me as doing this all wrong, but maybe I'm just missing something.

sys/dev/usb/controller/xhci_pci.h
154

This should be a table.

In D53904#1231939, @imp wrote:

So I'd like to see the loader patches too before this lands. This strikes me as doing this all wrong, but maybe I'm just missing something.

If I remember correctly it is only used to limit to known chipsets like:

if (xhci_pci_match(dev) != NULL)

udbc_alloc(cons, ....);

I am sure thj will know where the latest tree is.

In D53904#1231939, @imp wrote:

So I'd like to see the loader patches too before this lands. This strikes me as doing this all wrong, but maybe I'm just missing something.

The loader patches are here: https://reviews.freebsd.org/D53472

I've split this and some other changes out of this set, but not yet updated it to reflect that.