diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-04-28 10:33:15 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-04-28 10:33:15 -0500 |
commit | 1154768ad342cc3ad295340130c1fad6869effa9 (patch) | |
tree | 877f93098d09b70799ede33a5ef6a82cddfa50dc /drivers/pci | |
parent | 95773672830d49ed6202bfa47cbb752823c96593 (diff) | |
parent | cd183740480f045600aa1fa38fe70809b5498f05 (diff) | |
download | linux-1154768ad342cc3ad295340130c1fad6869effa9.tar.bz2 |
Merge branch 'pci/host-thunder' into next
* pci/host-thunder:
PCI/ACPI: Add ThunderX pass2.x 2nd node MCFG quirk
PCI/ACPI: Tidy up MCFG quirk whitespace
PCI: Avoid generating invalid ThunderX2 DMA aliases
PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT
PCI: Apply Cavium ACS quirk only to CN81xx/CN83xx/CN88xx devices
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/quirks.c | 17 | ||||
-rw-r--r-- | drivers/pci/search.c | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 673683660b5c..9843773b5f53 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3958,6 +3958,20 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2260, quirk_mic_x200_dma_alias); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2264, quirk_mic_x200_dma_alias); /* + * The IOMMU and interrupt controller on Broadcom Vulcan/Cavium ThunderX2 are + * associated not at the root bus, but at a bridge below. This quirk avoids + * generating invalid DMA aliases. + */ +static void quirk_bridge_cavm_thrx2_pcie_root(struct pci_dev *pdev) +{ + pdev->dev_flags |= PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT; +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000, + quirk_bridge_cavm_thrx2_pcie_root); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084, + quirk_bridge_cavm_thrx2_pcie_root); + +/* * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) * class code. Fix it. */ @@ -4095,6 +4109,9 @@ static int pci_quirk_cavium_acs(struct pci_dev *dev, u16 acs_flags) acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR | PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT); + if (!((dev->device >= 0xa000) && (dev->device <= 0xa0ff))) + return -ENOTTY; + return acs_flags ? 0 : 1; } diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 33e0f033a48e..4c6044ad7368 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c @@ -60,6 +60,10 @@ int pci_for_each_dma_alias(struct pci_dev *pdev, tmp = bus->self; + /* stop at bridge where translation unit is associated */ + if (tmp->dev_flags & PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT) + return ret; + /* * PCIe-to-PCI/X bridges alias transactions from downstream * devices using the subordinate bus number (PCI Express to |