Skip to content

Commit 9d27e39

Browse files
fxkamdbjorn-helgaas
authored andcommitted
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: 7ce3f91 ("PCI: Enable PASID only if entire path supports End-End TLP prefixes") Signed-off-by: Felix Kuehling <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent bfc4560 commit 9d27e39

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/pci/probe.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2074,6 +2074,7 @@ static void pci_configure_eetlp_prefix(struct pci_dev *dev)
20742074
{
20752075
#ifdef CONFIG_PCI_PASID
20762076
struct pci_dev *bridge;
2077+
int pcie_type;
20772078
u32 cap;
20782079

20792080
if (!pci_is_pcie(dev))
@@ -2083,7 +2084,9 @@ static void pci_configure_eetlp_prefix(struct pci_dev *dev)
20832084
if (!(cap & PCI_EXP_DEVCAP2_EE_PREFIX))
20842085
return;
20852086

2086-
if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
2087+
pcie_type = pci_pcie_type(dev);
2088+
if (pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
2089+
pcie_type == PCI_EXP_TYPE_RC_END)
20872090
dev->eetlp_prefix_path = 1;
20882091
else {
20892092
bridge = pci_upstream_bridge(dev);

0 commit comments

Comments
 (0)