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)
Fri, Nov 8, 7:50 PM
Unknown Object (File)
Fri, Nov 8, 7:42 PM
Unknown Object (File)
Fri, Nov 8, 4:46 PM
Unknown Object (File)
Sun, Oct 20, 7:45 PM
Unknown Object (File)
Oct 7 2024, 10:28 AM
Unknown Object (File)
Oct 3 2024, 6:28 AM
Unknown Object (File)
Oct 3 2024, 12:12 AM
Unknown Object (File)
Oct 2 2024, 3:12 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
365

Factor this line into the lkpifill_pci_dev() function ?

445

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
365

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

445

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