From: Alex Williamson <alex.williamson@redhat.com>
To: linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org
Cc: bhelgaas@google.com, acooks@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH v2 03/15] PCI: quirk dma_func_alias for Ricoh devices
Date: Fri, 09 May 2014 09:28:43 -0600 [thread overview]
Message-ID: <20140509152843.8321.81165.stgit@bling.home> (raw)
In-Reply-To: <20140509151735.8321.22017.stgit@bling.home>
The existing quirk for these devices doesn't really solve the problem,
re-implement it using the DMA alias iterator. We'll come back later
and remove the existing quirk and dma_source interface.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
drivers/pci/quirks.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index e729206..fa70476 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3333,6 +3333,22 @@ int pci_dev_specific_reset(struct pci_dev *dev, int probe)
return -ENOTTY;
}
+static void quirk_dma_func0_alias(struct pci_dev *dev)
+{
+ if (PCI_SLOT(dev->devfn) != 0)
+ dev->dma_func_alias |= (1 << 0);
+}
+
+/*
+ * https://bugzilla.redhat.com/show_bug.cgi?id=605888
+ *
+ * Some Ricoh devices use function 0 as the PCIe requester ID for DMA.
+ */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH, 0xe822, quirk_dma_func0_alias);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH, 0xe230, quirk_dma_func0_alias);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH, 0xe832, quirk_dma_func0_alias);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_RICOH, 0xe476, quirk_dma_func0_alias);
+
static struct pci_dev *pci_func_0_dma_source(struct pci_dev *dev)
{
if (!PCI_FUNC(dev->devfn))
next prev parent reply other threads:[~2014-05-09 15:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 15:28 [PATCH v2 00/15] PCI/iommu: Fix DMA alias problems Alex Williamson
2014-05-09 15:28 ` [PATCH v2 01/15] PCI: Add DMA alias iterator Alex Williamson
2014-05-09 15:28 ` [PATCH v2 02/15] PCI: quirk pci_for_each_dma_alias() Alex Williamson
2014-05-09 15:28 ` Alex Williamson [this message]
2014-05-09 15:28 ` [PATCH v2 04/15] PCI: quirk dma_func_alias for Marvell devices Alex Williamson
2014-05-09 15:28 ` [PATCH v2 05/15] PCI: Quirk pci_for_each_dma_alias() for bridges Alex Williamson
2014-05-09 15:29 ` [PATCH v2 06/15] PCI: Add quirks for ASMedia and Tundra bridges Alex Williamson
2014-05-09 15:29 ` [PATCH v2 07/15] PCI: Consolidate isolation domain code Alex Williamson
2014-05-09 15:29 ` [PATCH v2 08/15] iommu/amd: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-09 15:29 ` [PATCH v2 09/15] iommu/amd: Update to use PCI DMA aliases Alex Williamson
2014-05-09 15:29 ` [PATCH v2 10/15] iommu/intel: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-09 15:29 ` [PATCH v2 11/15] iommu/intel: Update to use PCI DMA aliases Alex Williamson
2014-05-09 15:29 ` [PATCH v2 12/15] iommu/fsl: Use pci_find_dma_isolation_root() for IOMMU groups Alex Williamson
2014-05-09 15:29 ` [PATCH v2 13/15] iommu: Remove pci.h Alex Williamson
2014-05-09 15:29 ` [PATCH v2 14/15] PCI: Remove pci_find_upstream_pcie_bridge() Alex Williamson
2014-05-09 15:29 ` [PATCH v2 15/15] PCI: Remove pci_get_dma_source() Alex Williamson
2014-05-14 23:40 ` [PATCH v2 00/15] PCI/iommu: Fix DMA alias problems Andrew Cooks
2014-05-15 17:43 ` Alex Williamson
2014-05-15 23:45 ` Andrew Cooks
2014-05-16 3:55 ` Alex Williamson
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=20140509152843.8321.81165.stgit@bling.home \
--to=alex.williamson@redhat.com \
--cc=acooks@gmail.com \
--cc=bhelgaas@google.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).