From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgw.gov.kz (mgw.gov.kz [89.218.88.242]) by dpdk.org (Postfix) with ESMTP id 9F356B352 for ; Mon, 21 Jul 2014 14:03:03 +0200 (CEST) Received: from mgw.gov.kz (mx.ctsat.kz [178.89.4.95]) by mgw.gov.kz with ESMTP id s6LC4FEA031818-s6LC4FEB031818; Mon, 21 Jul 2014 18:04:15 +0600 Received: from EXCASHUB1.rgp.local (192.168.40.51) by EdgeForefront.rgp.local (192.168.40.59) with Microsoft SMTP Server (TLS) id 14.2.247.3; Mon, 21 Jul 2014 18:03:53 +0600 Received: from deb-dpdk.rgp.local (192.168.35.15) by excashub1.rgp.local (192.168.40.48) with Microsoft SMTP Server (TLS) id 14.2.247.3; Mon, 21 Jul 2014 18:07:09 +0600 From: Yerden Zhumabekov To: Date: Mon, 21 Jul 2014 18:03:53 +0600 Message-ID: <1405944234-50272-3-git-send-email-e_zhumabekov@sts.kz> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405944234-50272-1-git-send-email-e_zhumabekov@sts.kz> References: <2795655.Wj4j2zIbVg@xps13> <1405944234-50272-1-git-send-email-e_zhumabekov@sts.kz> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.168.35.15] X-FEAS-SYSTEM-WL: e_zhumabekov@sts.kz Subject: [dpdk-dev] [igb_uio PATCH 2/3] igb_uio: pci_config_lock/pci_config_unlock wrappers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 12:03:04 -0000 Since PCI config lock/unlock functions were renamed in linux kernel, these wrappers are introduced to reflect this change. Signed-off-by: Yerden Zhumabekov --- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 02545d9..605410e 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -223,6 +223,26 @@ static const struct attribute_group dev_attr_grp = { .attrs = dev_attrs, }; +static inline void +pci_config_lock(struct pci_dev *pdev) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) + pci_block_user_cfg_access(pdev); +#else + pci_cfg_access_lock(pdev); +#endif +} + +static inline void +pci_config_unlock(struct pci_dev *pdev) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) + pci_unblock_user_cfg_access(pdev); +#else + pci_cfg_access_unlock(pdev); +#endif +} + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) /* Check if INTX works to control irq's. * Set's INTX_DISABLE flag and reads it back -- 1.7.10.4