Message ID | 1457016800-11903-1-git-send-email-jacek.lawrynowicz@intel.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On Thu, 3 Mar 2016 15:53:20 +0100 Jacek Lawrynowicz <jacek.lawrynowicz@intel.com> wrote: > MIC x200 NTB forwards PCIe traffic using multiple alien RID. They have to > be added as aliases to the DMA device in order to allow buffer access > when IOMMU is enabled. > > Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@intel.com> > Acked-by: David Woodhouse <David.Woodhouse@intel.com> > --- Reviewed-by: Alex Williamson <alex.williamson@redhat.com> > Updated quirk comment with requirement that aliases have to be matching > values programmed in the EEPROM. The LUT table on x200 is static so there > is no need to program it from the driver. > > drivers/pci/quirks.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index 51927a5..e66f09d 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -3696,6 +3696,20 @@ 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, 0x2264, quirk_mic_x200_dma_alias); > + > +/* > * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) > * class code. Fix it. > */ -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 51927a5..e66f09d 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3696,6 +3696,20 @@ 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, 0x2264, quirk_mic_x200_dma_alias); + +/* * Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero) * class code. Fix it. */