Page MenuHomeFreeBSD

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

Authored by bz on May 30 2021, 9:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 2:25 PM
Unknown Object (File)
Wed, Apr 10, 3:23 AM
Unknown Object (File)
Thu, Apr 4, 7:24 AM
Unknown Object (File)
Feb 23 2024, 6:25 AM
Unknown Object (File)
Feb 23 2024, 6:23 AM
Unknown Object (File)
Feb 23 2024, 6:18 AM
Unknown Object (File)
Feb 23 2024, 6:18 AM
Unknown Object (File)
Feb 22 2024, 6:02 PM

Details

Summary

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 well.
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
MFC after: 10 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39575
Build 36464: arc lint + arc unit

Event Timeline

bz requested review of this revision.May 30 2021, 9:41 PM

Anyone interested in this or should I go ahead and commit it?

I'd like two days more to look at this.

I'd like two days more to look at this.

ACK; That's fine; there's more out and Monday will be okay.

In D30558#690479, @bz wrote:

I'd like two days more to look at this.

ACK; That's fine; there's more out and Monday will be okay.

Do you think you'll have a chance in the next 48 hours to look at this or the other remaining reviews?

Two more comments and we are good to go.

sys/compat/linuxkpi/common/src/linux_pci.c
362

Factor this line into the lkpifill_pci_dev() function ?

443

Disable busmaster too?

bz marked 2 inline comments as done.

Fold dev.release into lkpifill_pci_dev().

sys/compat/linuxkpi/common/src/linux_pci.c
362

Done. I just need to find the other change adding the 2nd case of this assignment and sort it there as well then.

443

pcim_enable_device() doesn't track that; and not under "enable_io". This is merely the private opposite of pci_enable_device().

This revision is now accepted and ready to land.Jun 18 2021, 11:08 AM