aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-02-21 16:16:28 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-02-21 16:16:28 -0500
commitc4d052ce970ea98e9e1cc72461ba3b7a25397657 (patch)
treed0c4a9d4e9953478b0655a8e70be7a894a672db1
parent42d87e3ffbd53c4514bccc0f24e40d6231a567f5 (diff)
parent33be632b8443b6ac74aa293504f430604fb9abeb (diff)
Merge branch 'pci/virtualization' into next
* pci/virtualization: PCI: Add ACS quirk for Qualcomm QDF2400 and QDF2432
-rw-r--r--drivers/pci/quirks.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 30d4a53e0e5d..ca77d235867f 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4160,6 +4160,26 @@ static int pci_quirk_intel_pch_acs(struct pci_dev *dev, u16 acs_flags)
4160} 4160}
4161 4161
4162/* 4162/*
4163 * These QCOM root ports do provide ACS-like features to disable peer
4164 * transactions and validate bus numbers in requests, but do not provide an
4165 * actual PCIe ACS capability. Hardware supports source validation but it
4166 * will report the issue as Completer Abort instead of ACS Violation.
4167 * Hardware doesn't support peer-to-peer and each root port is a root
4168 * complex with unique segment numbers. It is not possible for one root
4169 * port to pass traffic to another root port. All PCIe transactions are
4170 * terminated inside the root port.
4171 */
4172static int pci_quirk_qcom_rp_acs(struct pci_dev *dev, u16 acs_flags)
4173{
4174 u16 flags = (PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_SV);
4175 int ret = acs_flags & ~flags ? 0 : 1;
4176
4177 dev_info(&dev->dev, "Using QCOM ACS Quirk (%d)\n", ret);
4178
4179 return ret;
4180}
4181
4182/*
4163 * Sunrise Point PCH root ports implement ACS, but unfortunately as shown in 4183 * Sunrise Point PCH root ports implement ACS, but unfortunately as shown in
4164 * the datasheet (Intel 100 Series Chipset Family PCH Datasheet, Vol. 2, 4184 * the datasheet (Intel 100 Series Chipset Family PCH Datasheet, Vol. 2,
4165 * 12.1.46, 12.1.47)[1] this chipset uses dwords for the ACS capability and 4185 * 12.1.46, 12.1.47)[1] this chipset uses dwords for the ACS capability and
@@ -4315,6 +4335,9 @@ static const struct pci_dev_acs_enabled {
4315 /* I219 */ 4335 /* I219 */
4316 { PCI_VENDOR_ID_INTEL, 0x15b7, pci_quirk_mf_endpoint_acs }, 4336 { PCI_VENDOR_ID_INTEL, 0x15b7, pci_quirk_mf_endpoint_acs },
4317 { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs }, 4337 { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs },
4338 /* QCOM QDF2xxx root ports */
4339 { 0x17cb, 0x400, pci_quirk_qcom_rp_acs },
4340 { 0x17cb, 0x401, pci_quirk_qcom_rp_acs },
4318 /* Intel PCH root ports */ 4341 /* Intel PCH root ports */
4319 { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs }, 4342 { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
4320 { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_spt_pch_acs }, 4343 { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_spt_pch_acs },