Commit 46277b75 authored by Joerg Roedel's avatar Joerg Roedel

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: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 5c11ad95
...@@ -176,8 +176,8 @@ static bool pci_iommuv2_capable(struct pci_dev *pdev) ...@@ -176,8 +176,8 @@ static bool pci_iommuv2_capable(struct pci_dev *pdev)
{ {
static const int caps[] = { static const int caps[] = {
PCI_EXT_CAP_ID_ATS, PCI_EXT_CAP_ID_ATS,
PCI_PRI_CAP, PCI_EXT_CAP_ID_PRI,
PCI_PASID_CAP, PCI_EXT_CAP_ID_PASID,
}; };
int i, pos; int i, pos;
...@@ -1978,13 +1978,13 @@ static int pri_reset_while_enabled(struct pci_dev *pdev) ...@@ -1978,13 +1978,13 @@ static int pri_reset_while_enabled(struct pci_dev *pdev)
u16 control; u16 control;
int pos; int pos;
pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
if (!pos) if (!pos)
return -EINVAL; return -EINVAL;
pci_read_config_word(pdev, pos + PCI_PRI_CONTROL_OFF, &control); pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
control |= PCI_PRI_RESET; control |= PCI_PRI_CTRL_RESET;
pci_write_config_word(pdev, pos + PCI_PRI_CONTROL_OFF, control); pci_write_config_word(pdev, pos + PCI_PRI_CTRL, control);
return 0; return 0;
} }
...@@ -2042,11 +2042,11 @@ bool pci_pri_tlp_required(struct pci_dev *pdev) ...@@ -2042,11 +2042,11 @@ bool pci_pri_tlp_required(struct pci_dev *pdev)
u16 control; u16 control;
int pos; int pos;
pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
if (!pos) if (!pos)
return false; return false;
pci_read_config_word(pdev, pos + PCI_PRI_CONTROL_OFF, &control); pci_read_config_word(pdev, pos + PCI_PRI_CTRL, &control);
return (control & PCI_PRI_TLP_OFF) ? true : false; return (control & PCI_PRI_TLP_OFF) ? true : false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment