From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 318FF2BC7 for ; Thu, 29 Mar 2018 18:37:42 +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 8502130C020; Thu, 29 Mar 2018 09:37:41 -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 CB113AC0729; Thu, 29 Mar 2018 09:37:40 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Darren Edamura , Rahul Gupta , Scott Branden Date: Thu, 29 Mar 2018 09:37:35 -0700 Message-Id: <20180329163735.51606-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.14.3 (Apple Git-98) Subject: [dpdk-dev] [PATCH v3] 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: , X-List-Received-Date: Thu, 29 Mar 2018 16:37:43 -0000 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. v2->v3: rebase against latest dpdk-next-net tree. --- kernel/linux/igb_uio/igb_uio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/linux/igb_uio/igb_uio.c b/kernel/linux/igb_uio/igb_uio.c index 4cae4dd27..cbc5ab63a 100644 --- a/kernel/linux/igb_uio/igb_uio.c +++ b/kernel/linux/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; -- 2.14.3 (Apple Git-98)