]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
LinuxKPI: implement irq_get_msi_desc()
authorBjoern A. Zeeb <bz@FreeBSD.org>
Mon, 28 Nov 2022 18:27:03 +0000 (18:27 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Thu, 23 Feb 2023 19:33:09 +0000 (19:33 +0000)
commit4876c939ce63c86fe918e469881cc92ec40cfbee
treef438056ec0638957d702f4ac6e1d0a534ec7dee2
parent0b165b1fce848c6c636548d54064eec5a9d82c55
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)
sys/compat/linuxkpi/common/include/linux/pci.h
sys/compat/linuxkpi/common/src/linux_pci.c