Page MenuHomeFreeBSD

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

Authored by bz on May 30 2021, 9:41 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; 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
364

Factor this line into the lkpifill_pci_dev() function ?

444

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
364

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

444

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