From 484c308d3c8bc5f7436ba7d8e060a9c8ab552fd3 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 22 Jul 2014 14:27:55 +0200 Subject: [PATCH] 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 --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.20.1