Page MenuHomeFreeBSD

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

Authored by thj on Tue, Nov 25, 3:29 PM.

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.Tue, Nov 25, 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.Tue, Nov 25, 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.