* [PATCH] PCI: Include PCI-to-PCIe bridges as "Downstream Ports"
@ 2017-04-19 13:53 Bjorn Helgaas
2017-04-20 13:41 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2017-04-19 13:53 UTC (permalink / raw)
To: linux-pci; +Cc: Jayachandran C
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: Bjorn Helgaas <bhelgaas@google.com>
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 1c8051003e67..9b09cd31158c 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: Include PCI-to-PCIe bridges as "Downstream Ports"
2017-04-19 13:53 [PATCH] PCI: Include PCI-to-PCIe bridges as "Downstream Ports" Bjorn Helgaas
@ 2017-04-20 13:41 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2017-04-20 13:41 UTC (permalink / raw)
To: linux-pci; +Cc: Jayachandran C
On Wed, Apr 19, 2017 at 08:53:32AM -0500, Bjorn Helgaas wrote:
> 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: Bjorn Helgaas <bhelgaas@google.com>
I applied this to pci/enumeration for v4.12.
> diff --git a/drivers/pci/access.c b/drivers/pci/access.c
> index 1c8051003e67..9b09cd31158c 100644
> --- a/drivers/pci/access.c
> +++ b/drivers/pci/access.c
> @@ -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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-20 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 13:53 [PATCH] PCI: Include PCI-to-PCIe bridges as "Downstream Ports" Bjorn Helgaas
2017-04-20 13:41 ` Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.