diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-04-12 12:49:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-10 00:36:09 +0900 |
commit | f9a07f3089169d943ba0e61e7670e61199020870 (patch) | |
tree | 5103bf8fe36f1f4c019477b879e3093fb3d4b1b6 /drivers | |
parent | c7faf5bbaeba30053627de3b333d3c17e051ba80 (diff) | |
download | linux-3.10-f9a07f3089169d943ba0e61e7670e61199020870.tar.gz linux-3.10-f9a07f3089169d943ba0e61e7670e61199020870.tar.bz2 linux-3.10-f9a07f3089169d943ba0e61e7670e61199020870.zip |
iommu/amd: Check for the right TLP prefix bit
commit a3b93121430c7b46c2895a7744261be107ccdf7f upstream.
Unfortunatly the PRI spec changed and moved the
TLP-prefix-required bit to a different location. This patch
makes the necessary change in the AMD IOMMU driver.
Regressions are not expected because all hardware
implementing the PRI capability sets this bit to zero
anyway.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index a5bee8e2dfc..08f3eecb87a 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -2035,20 +2035,20 @@ out_err: } /* FIXME: Move this to PCI code */ -#define PCI_PRI_TLP_OFF (1 << 2) +#define PCI_PRI_TLP_OFF (1 << 15) bool pci_pri_tlp_required(struct pci_dev *pdev) { - u16 control; + u16 status; int pos; pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); if (!pos) return false; - pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control); + pci_read_config_word(pdev, pos + PCI_PRI_STATUS, &status); - return (control & PCI_PRI_TLP_OFF) ? true : false; + return (status & PCI_PRI_TLP_OFF) ? true : false; } /* |