]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PCI: add PCI DMA source ID quirk
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 11 Jun 2012 05:26:55 +0000 (05:26 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 12 Jun 2012 00:37:43 +0000 (18:37 -0600)
commit12ea6cad1c7d046e21decc18b0e2170c6794dc51
treed72a1034cd7436c4b705e86f3cfc83dad03b3574
parentcfaf025112d3856637ff34a767ef785ef5cf2ca9
PCI: add PCI DMA source ID quirk

DMA transactions are tagged with the source ID of the device making
the request.  Occasionally hardware screws this up and uses the
source ID of a different device (often the wrong function number of
a multifunction device).  A specific Ricoh multifunction device is
a prime example of this problem and included in this patch.

Given a pci_dev, this function returns the pci_dev to use as the
source ID for DMA.  When hardware works correctly, this returns
the input device.  For the components of the Ricoh multifunction
device, it returns the pci_dev for function 0.

This will be used by IOMMU drivers for determining the boundaries
of IOMMU groups as multiple devices using the same source ID must
be contained within the same group.  This can also be used by
existing streaming DMA paths for the same purpose.

[bhelgaas: fold in pci_dev_get() for !CONFIG_PCI]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/quirks.c
include/linux/pci.h