Commit 9d27e39d authored by Felix Kuehling's avatar Felix Kuehling Committed by Bjorn Helgaas

PCI: Fix enabling of PASID on RC integrated endpoints

Set the eetlp_prefix_path on PCIE_EXP_TYPE_RC_END devices to allow PASID
to be enabled on them.  This fixes IOMMUv2 initialization on AMD Carrizo
APUs.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=201079
Fixes: 7ce3f912 ("PCI: Enable PASID only if entire path supports End-End TLP prefixes")
Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent bfc45606
...@@ -2074,6 +2074,7 @@ static void pci_configure_eetlp_prefix(struct pci_dev *dev) ...@@ -2074,6 +2074,7 @@ static void pci_configure_eetlp_prefix(struct pci_dev *dev)
{ {
#ifdef CONFIG_PCI_PASID #ifdef CONFIG_PCI_PASID
struct pci_dev *bridge; struct pci_dev *bridge;
int pcie_type;
u32 cap; u32 cap;
if (!pci_is_pcie(dev)) if (!pci_is_pcie(dev))
...@@ -2083,7 +2084,9 @@ static void pci_configure_eetlp_prefix(struct pci_dev *dev) ...@@ -2083,7 +2084,9 @@ static void pci_configure_eetlp_prefix(struct pci_dev *dev)
if (!(cap & PCI_EXP_DEVCAP2_EE_PREFIX)) if (!(cap & PCI_EXP_DEVCAP2_EE_PREFIX))
return; return;
if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT) pcie_type = pci_pcie_type(dev);
if (pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
pcie_type == PCI_EXP_TYPE_RC_END)
dev->eetlp_prefix_path = 1; dev->eetlp_prefix_path = 1;
else { else {
bridge = pci_upstream_bridge(dev); bridge = pci_upstream_bridge(dev);
......
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