From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2DC6632A5 for ; Wed, 9 Mar 2016 08:27:51 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 08 Mar 2016 23:27:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,310,1455004800"; d="scan'208";a="905752460" Received: from dpdk15.sh.intel.com ([10.239.129.25]) by orsmga001.jf.intel.com with ESMTP; 08 Mar 2016 23:27:48 -0800 From: Huawei Xie To: dev@dpdk.org Date: Tue, 8 Mar 2016 23:33:42 +0800 Message-Id: <1457451223-82306-6-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1457451223-82306-1-git-send-email-huawei.xie@intel.com> References: <20151222035041.GA7532@pxdev.xzpeter.org> <1457451223-82306-1-git-send-email-huawei.xie@intel.com> Cc: nikita.troitsky@intel.com Subject: [dpdk-dev] [PATCH v5 5/6] eal: map IO port when kernel driver isn't managing the device 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: Wed, 09 Mar 2016 07:27:51 -0000 call rte_eal_pci_ioport_map (on x86) only if the pci device is not bound to a kernel driver. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 4ede4cb..833529f 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -698,11 +698,13 @@ rte_eal_pci_ioport_map(struct rte_pci_device *dev, int bar, case RTE_KDRV_UIO_GENERIC: ret = pci_uio_ioport_map(dev, bar, p); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) ret = pci_ioport_map(dev, bar, p); #endif break; + default: + break; } if (!ret) -- 1.8.1.4