* [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses
@ 2016-12-01 20:34 Andy Gospodarek
2016-12-01 20:37 ` Ray Jui
2016-12-08 18:26 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Andy Gospodarek @ 2016-12-01 20:34 UTC (permalink / raw)
To: linux-arm-kernel
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: Ray Jui <rjui@broadcom.com>
---
drivers/pci/host/pcie-iproc-platform.c | 9 ++++++++-
drivers/pci/host/pcie-iproc.c | 5 ++++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c
index fd3ed9b..22d814a 100644
--- a/drivers/pci/host/pcie-iproc-platform.c
+++ b/drivers/pci/host/pcie-iproc-platform.c
@@ -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)
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index cd51334..3ebc025 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -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;
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses
2016-12-01 20:34 [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses Andy Gospodarek
@ 2016-12-01 20:37 ` Ray Jui
2016-12-08 18:26 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Ray Jui @ 2016-12-01 20:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi Andy,
On 12/1/2016 12:34 PM, Andy Gospodarek wrote:
> 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: Ray Jui <rjui@broadcom.com>
This should be replaced Acked-by: Ray Jui <ray.jui@broadcom.com>
And this patch looks good to me. Thanks!
Ray
> ---
> drivers/pci/host/pcie-iproc-platform.c | 9 ++++++++-
> drivers/pci/host/pcie-iproc.c | 5 ++++-
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c
> index fd3ed9b..22d814a 100644
> --- a/drivers/pci/host/pcie-iproc-platform.c
> +++ b/drivers/pci/host/pcie-iproc-platform.c
> @@ -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)
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index cd51334..3ebc025 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses
2016-12-01 20:34 [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses Andy Gospodarek
2016-12-01 20:37 ` Ray Jui
@ 2016-12-08 18:26 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2016-12-08 18:26 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 01, 2016 at 03:34:52PM -0500, Andy Gospodarek wrote:
> 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: Ray Jui <rjui@broadcom.com>
Applied to pci/host-iproc for v4.10 with Ray's acked-by, thanks!
> ---
> drivers/pci/host/pcie-iproc-platform.c | 9 ++++++++-
> drivers/pci/host/pcie-iproc.c | 5 ++++-
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c
> index fd3ed9b..22d814a 100644
> --- a/drivers/pci/host/pcie-iproc-platform.c
> +++ b/drivers/pci/host/pcie-iproc-platform.c
> @@ -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)
> diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
> index cd51334..3ebc025 100644
> --- a/drivers/pci/host/pcie-iproc.c
> +++ b/drivers/pci/host/pcie-iproc.c
> @@ -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;
> --
> 2.1.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-08 18:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-01 20:34 [PATCH pci/host-iproc] pci-iproc: skip check for legacy IRQ on PAXC buses Andy Gospodarek
2016-12-01 20:37 ` Ray Jui
2016-12-08 18:26 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox