From patchwork Mon Mar 26 20:43:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 36539 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DAE874C93; Mon, 26 Mar 2018 22:43:45 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 43B054C8C for ; Mon, 26 Mar 2018 22:43:43 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id EB8A030C026; Mon, 26 Mar 2018 13:43:38 -0700 (PDT) Received: from C02VPB22HTD6.dhcp.broadcom.net (c02vpb22htd6.dhcp.broadcom.net [10.136.50.120]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 9A454AC074E; Mon, 26 Mar 2018 13:43:38 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Darren Edamura , Rahul Gupta , Scott Branden Date: Mon, 26 Mar 2018 13:43:36 -0700 Message-Id: <20180326204336.24236-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.14.3 (Apple Git-98) In-Reply-To: <5fa0e9d9-9c64-c1e8-423d-e9d4441d5b3c@intel.com> References: <5fa0e9d9-9c64-c1e8-423d-e9d4441d5b3c@intel.com> Subject: [dpdk-dev] [PATCH v2] igb_uio: bind error if pcie bridge X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Darren Edamura Probe function should exit immediately if pcie bridge detected Signed-off-by: Darren Edamura Signed-off-by: Rahul Gupta Signed-off-by: Scott Branden Signed-off-by: Ajit Khaparde --- v1->v2: add a log message if the condition is true. --- 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 4cae4dd27..cbc5ab63a 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -473,6 +473,11 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) void *map_addr; int err; + if (pci_is_bridge(dev)) { + dev_warn(&dev->dev, "Ignoring PCI bridge device\n"); + return -ENODEV; + } + udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL); if (!udev) return -ENOMEM;