]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PCI: Disable MSI for Freescale Layerscape PCIe RC mode
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Thu, 12 Oct 2017 09:44:47 +0000 (17:44 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 20 Oct 2017 18:25:03 +0000 (13:25 -0500)
The Freescale PCIe controller advertises the MSI/MSI-X capability in both
RC and Endpoint mode, but in RC mode it doesn't support MSI/MSI-X by
itself; it can only transfer MSI/MSI-X from downstream devices.

Add a quirk to prevent use of MSI/MSI-X in RC mode.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Minghuan Lian <minghuan.Lian@nxp.com>
drivers/pci/quirks.c

index a4d33619a7bb67157f128f0009a58f9d21c7c727..c1063a420f0cbe8103e486a23294ce48dead0a05 100644 (file)
@@ -4799,3 +4799,11 @@ static void quirk_no_ats(struct pci_dev *pdev)
 /* AMD Stoney platform GPU */
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_no_ats);
 #endif /* CONFIG_PCI_ATS */
+
+/* Freescale PCIe doesn't support MSI in RC mode */
+static void quirk_fsl_no_msi(struct pci_dev *pdev)
+{
+       if (pci_pcie_type(pdev) == PCI_EXP_TYPE_ROOT_PORT)
+               pdev->no_msi = 1;
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_FREESCALE, PCI_ANY_ID, quirk_fsl_no_msi);