summaryrefslogtreecommitdiff
path: root/drivers/pci/search.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2020-01-29 17:00:02 -0600
committerBjorn Helgaas <bhelgaas@google.com>2020-01-29 17:00:02 -0600
commitdb83c269d22598ec1f5e3e6692a58a92a153e5f1 (patch)
tree153068534a8861bc6bb34be130861d7f6df2e971 /drivers/pci/search.c
parentc7417cf36aabb93f3b1e37b7e28bece46711429e (diff)
parentdb51b4c85fb756f33617c1d29643e57be9bd2f1d (diff)
Merge branch 'pci/host-vmd'
- Save VMD's pci_dev in x86 struct pci_sysdata (Jon Derrick) - Add pci_real_dma_dev() for DMA aliases not on the same bus as requester (Jon Derrick) - Add IOMMU mappings for pci_real_dma_dev() (Jon Derrick) - Remove IOMMU sanity checks for VMD devices (Jon Derrick) - Remove VMD dma_map_ops overrides (Jon Derrick) - Remove unused X86_DEV_DMA_OPS (Christoph Hellwig) - Add VMD device IDs that need bus restriction mode (Sushma Kalakota) * pci/host-vmd: PCI: vmd: Add two VMD Device IDs x86/PCI: Remove X86_DEV_DMA_OPS PCI: vmd: Remove dma_map_ops overrides iommu/vt-d: Remove VMD child device sanity check iommu/vt-d: Use pci_real_dma_dev() for mapping PCI: Introduce pci_real_dma_dev() x86/PCI: Expose VMD's pci_dev in struct pci_sysdata x86/PCI: Add to_pci_sysdata() helper
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r--drivers/pci/search.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index e4dbdef5aef0..2061672954ee 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -32,6 +32,12 @@ int pci_for_each_dma_alias(struct pci_dev *pdev,
struct pci_bus *bus;
int ret;
+ /*
+ * The device may have an explicit alias requester ID for DMA where the
+ * requester is on another PCI bus.
+ */
+ pdev = pci_real_dma_dev(pdev);
+
ret = fn(pdev, pci_dev_id(pdev), data);
if (ret)
return ret;