summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@6wind.com>2014-04-29 16:16:03 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-04-30 01:31:30 +0200
commit8c910d01aedf435128287dc8c556e48c1a8660e7 (patch)
treed0db1150b24245a14e1a820d39028295734785b9
parent22139b107b2c3d71a69c6338907e60ca2a207c2a (diff)
downloaddpdk-8c910d01aedf435128287dc8c556e48c1a8660e7.zip
dpdk-8c910d01aedf435128287dc8c556e48c1a8660e7.tar.gz
dpdk-8c910d01aedf435128287dc8c556e48c1a8660e7.tar.xz
kni: fix build with debian kernel 3.2.57-2
Following debian kernel headers upgrade to 3.2.57, pci capability accessors have been backported (upstream commit 8c0d3a02c1309eb6112d2e7c8172e8ceb26ecfca, ("PCI: Add accessors for PCI Express Capability", v3.7-rc1)). It results in the same compilation error as redhat 6.x. However, there is no clear way to determine we are building on a debian kernel. So, rather than determine if we are building on a distribution kernel, look at PCI_EXP_LNKSTA2 that appeared in this upstream commit. Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
-rw-r--r--lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index d2f65ab..19df483 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3691,8 +3691,7 @@ static inline u8 pci_pcie_type(struct pci_dev *pdev)
#define ptp_clock_register(caps, args...) ptp_clock_register(caps)
-#if !(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(11,3,0)) && \
- !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,5))
+#ifndef PCI_EXP_LNKSTA2
int __kc_pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val);
#define pcie_capability_read_word(d,p,v) __kc_pcie_capability_read_word(d,p,v)
int __kc_pcie_capability_write_word(struct pci_dev *dev, int pos, u16 val);
@@ -3709,8 +3708,7 @@ static inline int pcie_capability_clear_word(struct pci_dev *dev, int pos,
{
return __kc_pcie_capability_clear_and_set_word(dev, pos, clear, 0);
}
-#endif /* !(SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(11,3,0)) && \
- !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,5)) */
+#endif /* !PCI_EXP_LNKSTA2 */
#if (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(11,3,0))
#define USE_CONST_DEV_UC_CHAR