diff options
author | Ilya Kuznetsov <ilya@yadro.com> | 2019-06-24 16:34:50 +0300 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-07-19 17:46:22 +1000 |
commit | dab352eecb1dac78112c67d322655e0eae0a16ba (patch) | |
tree | 6d969ae1a44ef442214d2b95c1579da97913d3ae | |
parent | 067de39aa3334248232ea09d3215ae7055a811f3 (diff) | |
download | skiboot-dab352eecb1dac78112c67d322655e0eae0a16ba.zip skiboot-dab352eecb1dac78112c67d322655e0eae0a16ba.tar.gz skiboot-dab352eecb1dac78112c67d322655e0eae0a16ba.tar.bz2 |
pci-slot: Allow to create slot for downstream port of any switch
System vendor may build systems with large PCIe tree with
deeper switch topologies. Currenlty downstream ports slot
creation is limited to first switch. Patch allows to use any.
Signed-off-by: Ilya Kuznetsov <ilya@yadro.com>
[oliver: added pci-slot prefix]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
-rw-r--r-- | core/pcie-slot.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/core/pcie-slot.c b/core/pcie-slot.c index e7013d1..dc5e4dc 100644 --- a/core/pcie-slot.c +++ b/core/pcie-slot.c @@ -544,13 +544,8 @@ struct pci_slot *pcie_slot_create_dynamic(struct phb *phb, if (!phb || !pd || pd->slot) return NULL; - /* Try to create slot whose details aren't provided by platform. - * We only care the downstream ports of PCIe switch that connects - * to root port. - */ - if (pd->dev_type != PCIE_TYPE_SWITCH_DNPORT || - !pd->parent || !pd->parent->parent || - pd->parent->parent->parent) + /* Try to create slot whose details aren't provided by platform. */ + if (pd->dev_type != PCIE_TYPE_SWITCH_DNPORT) return NULL; ecap = pci_cap(pd, PCI_CFG_CAP_ID_EXP, false); |