]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: allow a driver to override the default pci probe result
authorBjoern A. Zeeb <bz@FreeBSD.org>
Fri, 18 Feb 2022 21:58:01 +0000 (21:58 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Sun, 27 Mar 2022 18:06:33 +0000 (18:06 +0000)
commit3166cea632449ce6c6dad699a812b9813a9531ef
treeeb14bc985a05ce970b3ea502f16cc67067ed3f7f
parenta8c3d6b71645b6b16715b3a07013779b296e7ca7
LinuxKPI: allow a driver to override the default pci probe result

Add bsd_probe_return which a driver can set in their 'struct pci_driver'
definition to set a driver-sepcific LinuxKPI pci return value.
This is helpful in case of multiple drivers with overlapping IDs,
such as iwlwifi(4) and iwm(4).

Contrary to an earlier version we now assume 0 is not BUS_PROBE_SPECIFIC
(which no driver should really return these days) but the bss initialized
value (bsd_probe_return unset) and we will return BUS_PROBE_DEFAULT.

Suggested by: jhb
Reviewed by: jhb
Reviewed by: hselasky, imp (earlier versions)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33915

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