diff options
author | Jacek Lawrynowicz <jacek.lawrynowicz@intel.com> | 2016-03-03 15:53:20 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-04-11 23:33:40 -0500 |
commit | b1a928cdb477037fb7c10fbf94c47f65f2bcce77 (patch) | |
tree | 09b58c59113002ebc4f456899ebe450a248dd30d /drivers/pci/quirks.c | |
parent | 338c3149a221527e202ee26b1e35f76c965bb6c0 (diff) | |
download | linux-next-b1a928cdb477037fb7c10fbf94c47f65f2bcce77.tar.gz |
PCI: Add DMA alias quirk for mic_x200_dma
The MIC x200 NTB forwards DMA transactions upstream using multiple alien
RIDs. These RIDs have to be added as aliases to the DMA device to allow
buffer access when the IOMMU is enabled.
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r-- | drivers/pci/quirks.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 7559e4024447..8889ac433cf1 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3725,6 +3725,21 @@ DECLARE_PCI_FIXUP_HEADER(0x1283, 0x8892, quirk_use_pcie_bridge_dma_alias); DECLARE_PCI_FIXUP_HEADER(0x8086, 0x244e, quirk_use_pcie_bridge_dma_alias); /* + * MIC x200 NTB forwards PCIe traffic using multiple alien RIDs. They have to + * be added as aliases to the DMA device in order to allow buffer access + * when IOMMU is enabled. Following devfns have to match RIT-LUT table + * programmed in the EEPROM. + */ +static void quirk_mic_x200_dma_alias(struct pci_dev *pdev) +{ + pci_add_dma_alias(pdev, PCI_DEVFN(0x10, 0x0)); + pci_add_dma_alias(pdev, PCI_DEVFN(0x11, 0x0)); + pci_add_dma_alias(pdev, PCI_DEVFN(0x12, 0x3)); +} +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); + +/* * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) * class code. Fix it. */ |