summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-12-30 08:52:03 +0000
committerngie <ngie@FreeBSD.org>2015-12-30 08:52:03 +0000
commita84969ed1aae79dccc82d27cf0016394808c7320 (patch)
tree214e5de04203cdf6f4b382932d1dd0ea63753116 /sys/ofed
parenta3b7fafab78043fe8355bb68596028cb9bba40ad (diff)
downloadFreeBSD-src-a84969ed1aae79dccc82d27cf0016394808c7320.zip
FreeBSD-src-a84969ed1aae79dccc82d27cf0016394808c7320.tar.gz
MFC r270212,r270332:
This helps reduce the diff in pci(4) between head and stable/10 to help pave the way for bringing in IOV/nv(9) more cleanly Differential Revision: https://reviews.freebsd.org/D4728 Relnotes: yes Reviewed by: hselasky (ofed piece), royger (overall change) Sponsored by: EMC / Isilon Storage Division r270212 (by royger): 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. r270332 (by royger): pci: add a new pci_child_added newbus method. This is needed so when running under Xen the calls to pci_child_added can be intercepted and a custom Xen method can be used to register those devices with Xen. This should not include any functional change, since the Xen implementation will be added in a following patch and the native implementation is a noop. Sponsored by: Citrix Systems R&D Reviewed by: jhb dev/pci/pci.c: dev/pci/pci_if.m: dev/pci/pci_private.h: dev/pci/pcivar.h: - Add the pci_child_added newbus method.
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/include/linux/pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/ofed/include/linux/pci.h b/sys/ofed/include/linux/pci.h
index a2f02b5..2e6eef4 100644
--- a/sys/ofed/include/linux/pci.h
+++ b/sys/ofed/include/linux/pci.h
@@ -566,7 +566,11 @@ struct msix_entry {
/*
* Enable msix, positive errors indicate actual number of available
* vectors. Negative errors are failures.
+ *
+ * NB: define added to prevent this definition of pci_enable_msix from
+ * clashing with the native FreeBSD version.
*/
+#define pci_enable_msix linux_pci_enable_msix
static inline int
pci_enable_msix(struct pci_dev *pdev, struct msix_entry *entries, int nreq)
{
OpenPOWER on IntegriCloud