HomeFreeBSD

LinuxKPI: pci: cleanup some code and add support for "pcim" (managed)

Description

LinuxKPI: pci: cleanup some code and add support for "pcim" (managed)

Restructure some code and add support for various "managed" versions
for PCI resource management.
This is beyond of what iwlwifi needs but some was found with other
wireless drivers and it mostly all goes together.
Add one FreeBSD sepcific feature returning the resource rather than
the handle to allow us to use bus_*() functions in drivers directly.

Sponsored by: The FreeBSD Foundation
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30558

(cherry picked from commit d4a4960c6559caa890af0901a21296e75b961210)
(cherry picked from commit 5f88df77a6a0c7609700e2f2c35b0dbcb211f1bb)
(cherry picked from commit 539228d372fae8c4cc401b7ba4620f27783be5a4)

Details

Provenance
bzAuthored on May 30 2021, 4:41 PM
Reviewer
hselasky
Differential Revision
D30558: LinuxKPI: pci: cleanup some code and add support for "pcim" (managed)
Parents
rGd2127676cd1a: LinuxKPI: fix pci device devres initialisation
Branches
Unknown
Tags
Unknown