Page MenuHomeFreeBSD

LinuxKPI: extend pci.h by various functions
ClosedPublic

Authored by bz on May 28 2021, 11:35 AM.
Tags
None
Referenced Files
F87031902: D30521.id91068.diff
Fri, Jun 28, 1:49 PM
Unknown Object (File)
Thu, Jun 27, 4:34 PM
Unknown Object (File)
May 16 2024, 10:12 AM
Unknown Object (File)
May 16 2024, 10:12 AM
Unknown Object (File)
May 16 2024, 10:12 AM
Unknown Object (File)
May 14 2024, 6:59 AM
Unknown Object (File)
Feb 26 2024, 1:09 PM
Unknown Object (File)
Feb 23 2024, 6:25 AM

Details

Summary

Add dummy functions for dealing with "HotPlug" events which we currently
do not support. Leave a printf in case someone hits them so we can
implement.
Similar do for pci_disable_link_state() which none of the targeted
iwlwifi devices seems to need to my reading.

Add pci_dev_get(), pci_find_ext_capability() and pci_pme_capable().

The added pcie_find_root_port() is a bit special as we need to create
another linux pci device; for that make lkpinew_pci_dev() public
which is also helpful for other cases when we want to use the Linux
routines to check for device identifiers only and need a container
for the "bsddev" to use natively. This has proven to avoid basic
checking code for the sake of rewriting it to native field names
elsewhere. Given we cache the newly created "root" we also need to
make sure we clean it up.

Sponsored by: The FreeBSD Foundation
MFC after: 10 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39531
Build 36420: arc lint + arc unit

Event Timeline

bz requested review of this revision.May 28 2021, 11:35 AM

Anyone interested in this or should I go ahead and commit it?

You should also bump the FreeBSD version when pushing this.

You should also bump the FreeBSD version when pushing this.

does that mean this is ok?

Yes. See one comment.

sys/compat/linuxkpi/common/include/linux/pci.h
550

Maybe just remove this printf. Function returns error in any case.

This revision is now accepted and ready to land.Jun 18 2021, 11:34 AM
bz marked an inline comment as done.Jun 18 2021, 1:20 PM
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/pci.h
550

Done in the local tree for committing.

sys/compat/linuxkpi/common/include/linux/pci.h
1141

I think it is safe to remove this printf() aswell.

This revision was automatically updated to reflect the committed changes.
bz marked an inline comment as done.