HomeFreeBSD

LinuxKPI: implement irq_get_msi_desc()

Description

LinuxKPI: implement irq_get_msi_desc()

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.

Reviewed by: hselasky (earlier version)
Approved by: re (cperciva)
Differential Revision: https://reviews.freebsd.org/D37523

(cherry picked from commit 4b56afaf7bf4fa37bae5b26fd93ee1ff5969c1bb)
(cherry picked from commit 7d23664b35a2611dc4fea56f7cfd2b99f91626a0)

Details

Provenance
bzAuthored on Nov 28 2022, 6:27 PM
Reviewer
hselasky
Differential Revision
D37523: LinuxKPI: implement irq_get_msi_desc()
Parents
rG0b165b1fce84: LinuxKPI: 802.11: basic implementation of *queue(s)/*txq*
Branches
Unknown
Tags
Unknown