From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: [PATCH 04/13] pci: use scan_mode configuration Date: Tue, 11 Jul 2017 19:25:03 -0400 Message-ID: <20170711232512.54641-5-jblunck@infradead.org> References: <20170711232512.54641-1-jblunck@infradead.org> To: dev@dpdk.org Return-path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id E9E442E83 for ; Wed, 12 Jul 2017 01:25:37 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id k67so1741067wrc.1 for ; Tue, 11 Jul 2017 16:25:37 -0700 (PDT) Received: from localhost.localdomain ([37.228.147.16]) by smtp.gmail.com with ESMTPSA id k45sm311516ede.16.2017.07.11.16.25.36 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 11 Jul 2017 16:25:36 -0700 (PDT) In-Reply-To: <20170711232512.54641-1-jblunck@infradead.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When scanning/probing devices the bus should use its configuration instead of looking at the devargs->type field. Signed-off-by: Jan Blunck --- lib/librte_eal/common/eal_common_pci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 72fcc35c2..fb0e29ac4 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -197,8 +197,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, /* no initialization when blacklisted, return without error */ if (dev->device.devargs != NULL && - dev->device.devargs->type == - RTE_DEVTYPE_BLACKLISTED_PCI) { + rte_pci_bus.bus.conf.scan_mode == RTE_BUS_SCAN_BLACKLIST) { RTE_LOG(INFO, EAL, " Device is blacklisted, not" " initializing\n"); return 1; @@ -404,8 +403,7 @@ rte_pci_probe(void) /* probe all or only whitelisted devices */ if (probe_all) ret = pci_probe_all_drivers(dev); - else if (devargs != NULL && - devargs->type == RTE_DEVTYPE_WHITELISTED_PCI) + else if (devargs != NULL) ret = pci_probe_all_drivers(dev); if (ret < 0) { RTE_LOG(ERR, EAL, "Requested device " PCI_PRI_FMT -- 2.13.2