]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: extend pci.h by various functions for wireless driver
authorBjoern A. Zeeb <bz@FreeBSD.org>
Fri, 28 May 2021 11:16:12 +0000 (11:16 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Sun, 18 Jul 2021 00:35:03 +0000 (00:35 +0000)
commit40a215e38a4d01037fadc170116e157ad129854d
tree513cf4df8abe2116f6b4a1832e50e6567fc952ae
parentaf13c69522abc992de9fe652d229de9e71251c0c
LinuxKPI: extend pci.h by various functions for wireless driver

Add dummy functions for dealing with "HotPlug" events which we currently
do not support.

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
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30521

(cherry picked from commit 8e106c5230c1f0683ffc473db5c2e0d01b2bfeea)
sys/compat/linuxkpi/common/include/linux/pci.h
sys/compat/linuxkpi/common/src/linux_pci.c