aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-12-07 08:34:02 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2011-12-15 05:05:35 -0500
commit46277b75da1b6c57159496d536acc2e9352a7ee0 (patch)
tree6cabd9b79c7187fa755d694f96f1d712d2ad8807 /drivers/iommu/amd_iommu.c
parent5c11ad95b5ba7d5a3675f3d5829a8131a13b33d5 (diff)
iommu/amd: Adapt IOMMU driver to PCI register name changes
The symbolic register names for PCI and PASID changed in PCI code. This patch adapts the AMD IOMMU driver to these changes. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r--drivers/iommu/amd_iommu.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index a7cbcd46af9..d5074f42842 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -176,8 +176,8 @@ static bool pci_iommuv2_capable(struct pci_dev *pdev)
176{ 176{
177 static const int caps[] = { 177 static const int caps[] = {
178 PCI_EXT_CAP_ID_ATS, 178 PCI_EXT_CAP_ID_ATS,
179 PCI_PRI_CAP, 179 PCI_EXT_CAP_ID_PRI,
180 PCI_PASID_CAP, 180 PCI_EXT_CAP_ID_PASID,
181 }; 181 };
182 int i, pos; 182 int i, pos;
183 183
@@ -1978,13 +1978,13 @@ static int pri_reset_while_enabled(struct pci_dev *pdev)
1978 u16 control; 1978 u16 control;
1979 int pos; 1979 int pos;
1980 1980
1981 pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 1981 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
1982 if (!pos) 1982 if (!pos)
1983 return -EINVAL; 1983 return -EINVAL;
1984 1984
1985 pci_read_config_word(pdev, pos + PCI_PRI_CONTROL_OFF, &control); 1985 pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
1986 control |= PCI_PRI_RESET; 1986 control |= PCI_PRI_CTRL_RESET;
1987 pci_write_config_word(pdev, pos + PCI_PRI_CONTROL_OFF, control); 1987 pci_write_config_word(pdev, pos + PCI_PRI_CTRL, control);
1988 1988
1989 return 0; 1989 return 0;
1990} 1990}
@@ -2042,11 +2042,11 @@ bool pci_pri_tlp_required(struct pci_dev *pdev)
2042 u16 control; 2042 u16 control;
2043 int pos; 2043 int pos;
2044 2044
2045 pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 2045 pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
2046 if (!pos) 2046 if (!pos)
2047 return false; 2047 return false;
2048 2048
2049 pci_read_config_word(pdev, pos + PCI_PRI_CONTROL_OFF, &control); 2049 pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
2050 2050
2051 return (control & PCI_PRI_TLP_OFF) ? true : false; 2051 return (control & PCI_PRI_TLP_OFF) ? true : false;
2052} 2052}