]> git.openfabrics.org - ~aditr/compat.git/commitdiff
compat: Added HAVE_PCI_DEV_PCIE_MPSS macro
authorVladimir Sokolovsky <vlad@mellanox.com>
Tue, 9 Dec 2014 17:05:17 +0000 (19:05 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Tue, 9 Dec 2014 17:05:17 +0000 (19:05 +0200)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
compat/compat-3.13.c
config/rdma.m4

index c65634ca9cf9010031c662310574d73538367b5c..a76d1def304030028e7c6c104d7da72746a75820 100644 (file)
@@ -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
index ffa643216c53d5832153cdc01172bd94f23b1f1a..7f9188700047cbf4f12d7195d9dd8a65e83dac66 100644 (file)
@@ -1033,6 +1033,51 @@ AC_DEFUN([LINUX_CONFIG_COMPAT],
        ])
 
 
+       AC_MSG_CHECKING([if pci_dev has pcie_mpss])
+       LB_LINUX_TRY_COMPILE([
+               #include <linux/pci.h>
+       ],[
+               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 <uapi/linux/if_ether.h>
+       ],[
+               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 <linux/if_link.h>
+       ],[
+               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