Page MenuHomeFreeBSD

LinuxKPI: implement irq_get_msi_desc()
ClosedPublic

Authored by bz on Nov 28 2022, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 13, 12:44 AM
Unknown Object (File)
Jan 7 2023, 12:48 PM
Unknown Object (File)
Jan 7 2023, 12:16 PM
Unknown Object (File)
Dec 2 2022, 9:21 AM

Details

Summary

Add irq_get_msi_desc() as a wrapper around a PCI function which will
allocate a single cached value (see comment on struct) for the
msi_desc requested if it doesn't exist yet and handle freeing it
when the PCI device goes away. We take the values from the ivars of
the native (FreeBSD) device.

While changing struct pci_dev also add the msi_cap field requested by
a wireless driver.

Bump __FreeBSD_version so these changes can be detected.

MFC after: 3 days
X-MFC: move fields to end of struct (alloc happens in linux_pci.c)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Nov 28 2022, 6:41 PM
hselasky added a subscriber: hselasky.

Looks good.

sys/compat/linuxkpi/common/include/linux/pci.h
332

Put the comment above the field, instead of on the right. Readability.

This revision is now accepted and ready to land.Nov 28 2022, 7:23 PM

Move and update comment for msi_desc field.

This revision now requires review to proceed.Nov 28 2022, 8:26 PM
bz marked an inline comment as done.Dec 18 2022, 10:09 PM
This revision was not accepted when it landed; it landed in state Needs Review.Fri, Jan 13, 12:45 AM
This revision was automatically updated to reflect the committed changes.