summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci_if.m
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2014-08-20 14:57:20 +0000
committerroyger <royger@FreeBSD.org>2014-08-20 14:57:20 +0000
commit925b20548e7d264029fd1c9799fe3220802e2213 (patch)
tree6a6c6e2e764442ee07d40e322ef0884e4229db26 /sys/dev/pci/pci_if.m
parent944a288c8a655f05e1434e3e5d136a86e60a809b (diff)
downloadFreeBSD-src-925b20548e7d264029fd1c9799fe3220802e2213.zip
FreeBSD-src-925b20548e7d264029fd1c9799fe3220802e2213.tar.gz
pci: make MSI(-X) enable and disable methods of the PCI bus
Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix methods of the newbus PCI bus. This code should not include any functional change. Sponsored by: Citrix Systems R&D Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D354 dev/pci/pci.c: - Convert the mentioned functions to newbus methods. - Fix the callers of the converted functions. sys/dev/pci/pci_private.h: dev/pci/pci_if.m: - Declare the new methods. dev/pci/pcivar.h: - Add helpers to call the newbus methods. ofed/include/linux/pci.h: - Add define to prevent the ofed version of pci_enable_msix from clashing with the FreeBSD native version.
Diffstat (limited to 'sys/dev/pci/pci_if.m')
-rw-r--r--sys/dev/pci/pci_if.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/dev/pci/pci_if.m b/sys/dev/pci/pci_if.m
index 82864eb..26c3d37 100644
--- a/sys/dev/pci/pci_if.m
+++ b/sys/dev/pci/pci_if.m
@@ -138,6 +138,26 @@ METHOD int alloc_msix {
int *count;
};
+METHOD void enable_msi {
+ device_t dev;
+ device_t child;
+ uint64_t address;
+ uint16_t data;
+};
+
+METHOD void enable_msix {
+ device_t dev;
+ device_t child;
+ u_int index;
+ uint64_t address;
+ uint32_t data;
+};
+
+METHOD void disable_msi {
+ device_t dev;
+ device_t child;
+};
+
METHOD int remap_msix {
device_t dev;
device_t child;
OpenPOWER on IntegriCloud