From: Thomas Monjalon Date: Tue, 22 Jul 2014 12:27:55 +0000 (+0200) Subject: igb_uio: fix build with kernel older than 3.3 X-Git-Tag: spdx-start~10510 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=484c308d3c8bc5f7436ba7d8e060a9c8ab552fd3;p=dpdk.git igb_uio: fix build with kernel older than 3.3 Since Linux commit fb51ccbf217 (PCI: Rework config space blocking services), the functions pci_(un)block_user_cfg_access are replaced by pci_cfg_access_(un)lock. The compatibility with older functions was broken since commit 399a3f0db8b0 (igb_uio: fix IRQ mode handling). Reported-by: Yerden Zhumabekov Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 02545d9103..f220a12b50 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -37,6 +37,11 @@ #endif #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) +#define pci_cfg_access_lock pci_block_user_cfg_access +#define pci_cfg_access_unlock pci_unblock_user_cfg_access +#endif + #ifdef RTE_PCI_CONFIG #define PCI_SYS_FILE_BUF_SIZE 10 #define PCI_DEV_CAP_REG 0xA4