igb_uio: bind error if PCIe bridge
authorDarren Edamura <darren.edamura@broadcom.com>
Thu, 29 Mar 2018 16:37:35 +0000 (09:37 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 11 Apr 2018 21:39:46 +0000 (23:39 +0200)
Probe function should exit immediately if pcie bridge detected

Signed-off-by: Darren Edamura <darren.edamura@broadcom.com>
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
kernel/linux/igb_uio/igb_uio.c

index 4cae4dd..cbc5ab6 100644 (file)
@@ -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;