From 9ca221f444efb67ab5823d53fcf54c4a0ed1dfd1 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Tue, 9 Dec 2014 19:05:17 +0200 Subject: [PATCH] compat: Added HAVE_PCI_DEV_PCIE_MPSS macro Signed-off-by: Vladimir Sokolovsky --- compat/compat-3.13.c | 2 ++ config/rdma.m4 | 45 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/compat/compat-3.13.c b/compat/compat-3.13.c index c65634c..a76d1de 100644 --- a/compat/compat-3.13.c +++ b/compat/compat-3.13.c @@ -16,6 +16,7 @@ int pcie_get_mps(struct pci_dev *dev) } EXPORT_SYMBOL(pcie_get_mps); +#ifdef HAVE_PCI_DEV_PCIE_MPSS /** * pcie_set_mps - set PCI Express maximum payload size * @dev: PCI device to query @@ -40,3 +41,4 @@ int pcie_set_mps(struct pci_dev *dev, int mps) PCI_EXP_DEVCTL_PAYLOAD, v); } EXPORT_SYMBOL(pcie_set_mps); +#endif diff --git a/config/rdma.m4 b/config/rdma.m4 index ffa6432..7f91887 100644 --- a/config/rdma.m4 +++ b/config/rdma.m4 @@ -1033,6 +1033,51 @@ AC_DEFUN([LINUX_CONFIG_COMPAT], ]) + AC_MSG_CHECKING([if pci_dev has pcie_mpss]) + LB_LINUX_TRY_COMPILE([ + #include + ],[ + struct pci_dev pdev; + + pdev->pcie_mpss = 0; + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PCI_DEV_PCIE_MPSS, 1, + [pcie_mpss is defined]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([if uapi/linux/if_ether.h exist]) + LB_LINUX_TRY_COMPILE([ + #include + ],[ + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_UAPI_LINUX_IF_ETHER_H, 1, + [uapi/linux/if_ether.h exist]) + ],[ + AC_MSG_RESULT(no) + ]) + + AC_MSG_CHECKING([if ifla_vf_info has spoofchk]) + LB_LINUX_TRY_COMPILE([ + #include + ],[ + struct ifla_vf_info *ivf; + + ivf->spoofchk = 0; + return 0; + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VF_INFO_SPOOFCHK, 1, + [spoofchk is defined]) + ],[ + AC_MSG_RESULT(no) + ]) + ]) # # COMPAT_CONFIG_HEADERS -- 2.41.0