HomeFreeBSD

LinuxKPI: pci: implement [linuxkpi_]pcim_request_all_regions()

Description

LinuxKPI: pci: implement [linuxkpi_]pcim_request_all_regions()

Factor out the pci_request_region() implementation into an internal
function and make pci_request_region() a simple wrapperaround it.
Likewise implement pcim_request_all_regions() as a loop calling
pci_request_region() for each entry.

In two cases which we returned an error before (bar index is valid but
bar is not (no len), and neither IO nor MEM) we now reutrn success
(nothing to do for us). Otherwise callers, especially
pcim_request_all_regions() would error out for the wrong reasons.
This seems to also match the expected behaviour of pci_request_region().

Sponsored by: The FreeBSD Foundation (intially)
MFC after: 3 days
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D52068

Details

Provenance
bzAuthored on Jul 31 2025, 6:28 PM
Reviewer
dumbbell
Differential Revision
D52068: LinuxKPI: pci: implement [linuxkpi_]pcim_request_all_regions()
Parents
rG2f9064a5d2b5: LinuxKPI: pci: implement pcim_iomap()
Branches
Unknown
Tags
Unknown