aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVidya Sagar <vidyas@nvidia.com>2019-08-13 07:36:16 -0400
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2019-08-13 10:42:02 -0400
commit8c7e96d3fe75bb41fadf23e7a494f37d1cd9906c (patch)
treee63ea0e8daca556621de578adc5203c5f54d5eca
parent448d5a55759a2e60208b75ceed4bd88cd4f5a963 (diff)
PCI: Disable MSI for Tegra root ports
Tegra PCIe rootports don't generate MSI interrupts for PME and AER events. Since PCIe spec (Ref: r4.0 sec 7.7.1.2 and 7.7.2.2) doesn't support using a mix of INTx and MSI/MSI-X, MSI needs to be disabled to avoid root ports service drivers registering their respective ISRs with MSI interrupt and to let only INTx be used for all events. Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/pci/quirks.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 208aacf39329..168782c5d23b 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2593,6 +2593,59 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
2593 nvenet_msi_disable); 2593 nvenet_msi_disable);
2594 2594
2595/* 2595/*
2596 * PCIe spec r4.0 sec 7.7.1.2 and sec 7.7.2.2 say that if MSI/MSI-X is enabled,
2597 * then the device can't use INTx interrupts. Tegra's PCIe root ports don't
2598 * generate MSI interrupts for PME and AER events instead only INTx interrupts
2599 * are generated. Though Tegra's PCIe root ports can generate MSI interrupts
2600 * for other events, since PCIe specificiation doesn't support using a mix of
2601 * INTx and MSI/MSI-X, it is required to disable MSI interrupts to avoid port
2602 * service drivers registering their respective ISRs for MSIs.
2603 */
2604static void pci_quirk_nvidia_tegra_disable_rp_msi(struct pci_dev *dev)
2605{
2606 dev->no_msi = 1;
2607}
2608DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x1ad0,
2609 PCI_CLASS_BRIDGE_PCI, 8,
2610 pci_quirk_nvidia_tegra_disable_rp_msi);
2611DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x1ad1,
2612 PCI_CLASS_BRIDGE_PCI, 8,
2613 pci_quirk_nvidia_tegra_disable_rp_msi);
2614DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x1ad2,
2615 PCI_CLASS_BRIDGE_PCI, 8,
2616 pci_quirk_nvidia_tegra_disable_rp_msi);
2617DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf0,
2618 PCI_CLASS_BRIDGE_PCI, 8,
2619 pci_quirk_nvidia_tegra_disable_rp_msi);
2620DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1,
2621 PCI_CLASS_BRIDGE_PCI, 8,
2622 pci_quirk_nvidia_tegra_disable_rp_msi);
2623DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0e1c,
2624 PCI_CLASS_BRIDGE_PCI, 8,
2625 pci_quirk_nvidia_tegra_disable_rp_msi);
2626DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0e1d,
2627 PCI_CLASS_BRIDGE_PCI, 8,
2628 pci_quirk_nvidia_tegra_disable_rp_msi);
2629DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0e12,
2630 PCI_CLASS_BRIDGE_PCI, 8,
2631 pci_quirk_nvidia_tegra_disable_rp_msi);
2632DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0e13,
2633 PCI_CLASS_BRIDGE_PCI, 8,
2634 pci_quirk_nvidia_tegra_disable_rp_msi);
2635DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0fae,
2636 PCI_CLASS_BRIDGE_PCI, 8,
2637 pci_quirk_nvidia_tegra_disable_rp_msi);
2638DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0faf,
2639 PCI_CLASS_BRIDGE_PCI, 8,
2640 pci_quirk_nvidia_tegra_disable_rp_msi);
2641DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x10e5,
2642 PCI_CLASS_BRIDGE_PCI, 8,
2643 pci_quirk_nvidia_tegra_disable_rp_msi);
2644DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_NVIDIA, 0x10e6,
2645 PCI_CLASS_BRIDGE_PCI, 8,
2646 pci_quirk_nvidia_tegra_disable_rp_msi);
2647
2648/*
2596 * Some versions of the MCP55 bridge from Nvidia have a legacy IRQ routing 2649 * Some versions of the MCP55 bridge from Nvidia have a legacy IRQ routing
2597 * config register. This register controls the routing of legacy 2650 * config register. This register controls the routing of legacy
2598 * interrupts from devices that route through the MCP55. If this register 2651 * interrupts from devices that route through the MCP55. If this register