]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: iproc: Skip check for legacy IRQ on PAXC buses
authorAndy Gospodarek <gospo@broadcom.com>
Thu, 1 Dec 2016 20:34:52 +0000 (15:34 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 8 Dec 2016 18:24:20 +0000 (12:24 -0600)
PAXC and PAXCv2 buses do not support legacy IRQs so there is no reason to
even try and map them.  Without a change like this, one cannot create VFs
on Nitro ports since legacy interrupts are checked as part of the PCI
device creation process.  Testing on PAXC hardware showed that VFs are
properly created with only the change to not set pcie->map_irq, but just to
be safe the change in iproc_pcie_setup() will ensure that pdev_fixup_irq()
will not panic.

Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
drivers/pci/host/pcie-iproc-platform.c
drivers/pci/host/pcie-iproc.c

index fd3ed9bccaff68de28997860dd45db4308d54863..22d814a78a78bc60eaa61da82ceee561e62eb4d2 100644 (file)
@@ -108,7 +108,14 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
                return ret;
        }
 
-       pcie->map_irq = of_irq_parse_and_map_pci;
+       /* PAXC doesn't support legacy IRQs, skip mapping */
+       switch (pcie->type) {
+       case IPROC_PCIE_PAXC:
+       case IPROC_PCIE_PAXC_V2:
+               break;
+       default:
+               pcie->map_irq = of_irq_parse_and_map_pci;
+       }
 
        ret = iproc_pcie_setup(pcie, &res);
        if (ret)
index cd513342b9136ca7a1fa3c5c8dd3a19fa16b5c7c..3ebc025499b972ba47cef16e192f54f87bb674ba 100644 (file)
@@ -1274,7 +1274,10 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
 
        pci_scan_child_bus(bus);
        pci_assign_unassigned_bus_resources(bus);
-       pci_fixup_irqs(pci_common_swizzle, pcie->map_irq);
+
+       if (pcie->map_irq)
+               pci_fixup_irqs(pci_common_swizzle, pcie->map_irq);
+
        pci_bus_add_devices(bus);
 
        return 0;