[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200619141641.120639909@linuxfoundation.org>
Date: Fri, 19 Jun 2020 16:33:13 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Hou Zhiqiang <Zhiqiang.Hou@....com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Minghuan Lian <minghuan.Lian@....com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.14 148/190] PCI: Disable MSI for Freescale Layerscape PCIe RC mode
From: Hou Zhiqiang <Zhiqiang.Hou@....com>
[ Upstream commit 06dc4ee54e306eff61cbdac3593b42b09f618103 ]
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@....com>
Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
Acked-by: Minghuan Lian <minghuan.Lian@....com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/pci/quirks.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index e7ed051ec125..c751f2f81142 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4912,3 +4912,11 @@ static void quirk_no_ats(struct pci_dev *pdev)
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x98e4, quirk_no_ats);
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x6900, 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);
--
2.25.1
Powered by blists - more mailing lists