Commit 9b70ae49 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI: Include PCI-to-PCIe bridges as "Downstream Ports"



A PCI/PCI-X to PCI Express bridge, sometimes referred to as a "reverse
bridge", is a bridge with conventional PCI or PCI-X on its primary side and
a PCI Express Port on its secondary (downstream) side.

That PCIe Port is a Downstream Port and could be connected to a slot, just
like a Root Port or a Switch Downstream Port.  Make pcie_downstream_port()
return true for them, so we can access the Slot registers in the PCIe
capability.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent dc5205ef
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -700,7 +700,8 @@ static bool pcie_downstream_port(const struct pci_dev *dev)
	int type = pci_pcie_type(dev);

	return type == PCI_EXP_TYPE_ROOT_PORT ||
	       type == PCI_EXP_TYPE_DOWNSTREAM;
	       type == PCI_EXP_TYPE_DOWNSTREAM ||
	       type == PCI_EXP_TYPE_PCIE_BRIDGE;
}

bool pcie_cap_has_lnkctl(const struct pci_dev *dev)