]> 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)
commite0bd5f232c9c4b547fddf19545f24f7129eebf3f
tree03038b4566a5e1421bd59e0e5e9aeb8464aba810
parentd7b9039fd4cd436110bd493aa35e59ca751065ba
iommu/amd: Fix checking of pci dma aliases

Commit 19ad14a ('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 19ad14a98af7 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: 19ad14a98af7 ('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