From: Alex Williamson <alex.williamson@redhat.com>
To: Jacek Lawrynowicz <jacek.lawrynowicz@intel.com>,
linux-pci@vger.kernel.org
Cc: bhelgaas@google.com, dwmw2@infradead.org, jroedel@suse.de
Subject: Re: [PATCH v2 2/2] pci: Add DMA alias quirk for mic_x200_dma
Date: Tue, 26 Jan 2016 09:28:23 -0700 [thread overview]
Message-ID: <1453825703.26652.47.camel@redhat.com> (raw)
In-Reply-To: <1453804310-12946-2-git-send-email-jacek.lawrynowicz@intel.com>
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@intel.com>
> ---
> 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?
> + pci_enable_dma_alias(pdev, PCI_DEVFN(0x10, 0x0));
> + pci_enable_dma_alias(pdev, PCI_DEVFN(0x11, 0x0));
> + pci_enable_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.
> */
next prev parent reply other threads:[~2016-01-26 16:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 10:31 [PATCH v2 1/2] pci: Add support for multiple DMA aliases Jacek Lawrynowicz
2016-01-26 10:31 ` [PATCH v2 2/2] pci: Add DMA alias quirk for mic_x200_dma Jacek Lawrynowicz
2016-01-26 16:28 ` Alex Williamson [this message]
2016-01-26 17:20 ` Lawrynowicz, Jacek
2016-01-26 17:24 ` Jacek Lawrynowicz
2016-01-26 11:59 ` [PATCH v2 1/2] pci: Add support for multiple DMA aliases David Woodhouse
2016-01-26 12:04 ` Lawrynowicz, Jacek
2016-01-26 12:27 ` David Woodhouse
2016-01-26 14:34 ` Bjorn Helgaas
2016-01-26 14:52 ` Jacek Lawrynowicz
2016-01-26 15:07 ` David Woodhouse
2016-01-26 16:27 ` Alex Williamson
2016-01-26 17:12 ` Jacek Lawrynowicz
2016-01-26 23:31 ` Bjorn Helgaas
2016-01-26 23:42 ` Alex Williamson
2016-01-27 0:04 ` Bjorn Helgaas
2016-01-27 0:54 ` Alex Williamson
2016-01-27 20:05 ` Lawrynowicz, Jacek
2016-01-27 20:25 ` Alex Williamson
2016-01-30 11:06 ` [PATCH v3 0/2] Fixed couple of issues pointed by Alex and Bjorn Jacek Lawrynowicz
2016-01-30 11:06 ` [PATCH v3 1/2] pci: Add support for multiple DMA aliases Jacek Lawrynowicz
2016-02-15 17:22 ` Joerg Roedel
2016-01-30 11:06 ` [PATCH v3 2/2] pci: Add DMA alias quirk for mic_x200_dma Jacek Lawrynowicz
2016-01-27 20:01 ` [PATCH v2 1/2] pci: Add support for multiple DMA aliases Lawrynowicz, Jacek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453825703.26652.47.camel@redhat.com \
--to=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=dwmw2@infradead.org \
--cc=jacek.lawrynowicz@intel.com \
--cc=jroedel@suse.de \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.