]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Fix checking of pci dma aliases
authorJoerg Roedel <jroedel@suse.de>
Fri, 8 Apr 2016 13:12:24 +0000 (15:12 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 11 Apr 2016 14:07:51 +0000 (16:07 +0200)
commita3b51e0c6449701397f4a977b0cf4f64af9635c2
tree03038b4566a5e1421bd59e0e5e9aeb8464aba810
parent41aa7f45df2316f92d6d78cf3cd4e54d1bd39973
iommu/amd: Fix checking of pci dma aliases

Commit c7e02ba ('iommu/amd: Remove old alias handling code')
removed the old alias handling code from the AMD IOMMU
driver because this is now handled by the IOMMU core code.

But this also removed the handling of PCI aliases, which is
not handled by the core code. This caused issues with PCI
devices that have hidden PCIe-to-PCI bridges that rewrite
the request-id.

Fix this bug by re-introducing some of the removed functions
from commit c7e02ba51a72 and add a alias field
'struct iommu_dev_data'. This field carrys the return value
of the get_alias() function and uses that instead of the
amd_iommu_alias_table[] array in the code.

Fixes: c7e02ba51a72 ('iommu/amd: Remove old alias handling code')
Cc: stable@vger.kernel.org # v4.4+
Tested-by: Tomasz Golinski <tomaszg@math.uwb.edu.pl>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c