HomeFreeBSD

LinuxKPI: allow a driver to override the default pci probe result

Description

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.

Approved by: re (gjb)
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)
(cherry picked from commit 3166cea632449ce6c6dad699a812b9813a9531ef)

Details

Provenance
bzAuthored on Feb 18 2022, 9:58 PM
Reviewer
jhb
Differential Revision
D33915: LinuxKPI: allow a driver to override the default pci probe result
Parents
rG1717f1606b6e: LinuxKPI: remove duplicate include
Branches
Unknown
Tags
Unknown