diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:29 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-03-20 12:02:29 +0800 |
commit | 018ed21cf3b7cb618c63294793d63b23ce4afe24 (patch) | |
tree | 74dbac7cbb2288e8683ea5295cbf1aac42ab41c5 /drivers/pci/probe.c | |
parent | d661f15677f5205c1d272c2db90b60b2d56b25dd (diff) | |
parent | d97f745e1d2fea4d2f308e5e06eee81a9a84f3f5 (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-androidlsk-v4.1-17.03-android
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 36949b2d28b7..9e3ccfc0c3ce 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1012,6 +1012,7 @@ void set_pcie_port_type(struct pci_dev *pdev) pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); if (!pos) return; + pdev->pcie_cap = pos; pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16); pdev->pcie_flags_reg = reg16; @@ -1019,13 +1020,14 @@ void set_pcie_port_type(struct pci_dev *pdev) pdev->pcie_mpss = reg16 & PCI_EXP_DEVCAP_PAYLOAD; /* - * A Root Port is always the upstream end of a Link. No PCIe - * component has two Links. Two Links are connected by a Switch - * that has a Port on each Link and internal logic to connect the - * two Ports. + * A Root Port or a PCI-to-PCIe bridge is always the upstream end + * of a Link. No PCIe component has two Links. Two Links are + * connected by a Switch that has a Port on each Link and internal + * logic to connect the two Ports. */ type = pci_pcie_type(pdev); - if (type == PCI_EXP_TYPE_ROOT_PORT) + if (type == PCI_EXP_TYPE_ROOT_PORT || + type == PCI_EXP_TYPE_PCIE_BRIDGE) pdev->has_secondary_link = 1; else if (type == PCI_EXP_TYPE_UPSTREAM || type == PCI_EXP_TYPE_DOWNSTREAM) { |