> -----Original Message----- > From: linux-pci-owner@xxxxxxxxxxxxxxx [mailto:linux-pci- > owner@xxxxxxxxxxxxxxx] On Behalf Of Alex Williamson > Sent: Tuesday, January 26, 2016 5:28 PM > To: Lawrynowicz, Jacek <jacek.lawrynowicz@xxxxxxxxx>; linux- > pci@xxxxxxxxxxxxxxx > Cc: bhelgaas@xxxxxxxxxx; dwmw2@xxxxxxxxxxxxx; jroedel@xxxxxxx > Subject: Re: [PATCH v2 2/2] pci: Add DMA alias quirk for mic_x200_dma > > On Tue, 2016-01-26 at 11:31 +0100, Jacek Lawrynowicz 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@xxxxxxxxx> > > --- > > drivers/pci/quirks.c | 15 +++++++++++++++ > > 1 file changed, 15 insertions(+) > > > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index > > b094061..bc23bc8 100644 > > --- a/drivers/pci/quirks.c > > +++ b/drivers/pci/quirks.c > > @@ -3703,6 +3703,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 RID. They > > +have to > > + * be added as aliases to the DMA device in order to allow buffer > > +access > > + * when IOMMU is enabled. > > + */ > > +static void quirk_mic_x200_dma_alias(struct pci_dev *pdev) { > > + if (iommu_present(pdev->dev.bus)) { > > Why do we need this test? The alias simply goes unused without an IOMMU, > right? Right, I wanted to limit when the quirk is applied but it works without the check for iommu. I guess that the code will be a bit simpler without this check. I will remove it. -- Jacek Lawrynowicz Intel Technology Poland sp. z o.o. KRS 101882 - ul. Slowackiego 173, 80-298 Gdansk ��.n��������+%������w��{.n�����{���"�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥