]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:49:04 +0000 (14:49 -0700)
commit80424d70b7e9e3246cf173aa9a8e74d17bf3c775
tree79acdc9457443d67927ab82b2cd953197b092ec4
parent2c776b98a8b3102b6d0a18827e8f60dcb3f679f3
iommu/amd: Fix checking of pci dma aliases

commit e3156048346c28c695f5cf9db67a8cf88c90f947 upstream.

Commit 61289cb ('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 61289cbaf6c8 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: 61289cbaf6c8 ('iommu/amd: Remove old alias handling code')
Tested-by: Tomasz Golinski <tomaszg@math.uwb.edu.pl>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu.c