|
@@ -1169,6 +1169,7 @@ void set_pcie_port_type(struct pci_dev *pdev)
|
|
pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
|
|
pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
|
|
if (!pos)
|
|
if (!pos)
|
|
return;
|
|
return;
|
|
|
|
+
|
|
pdev->pcie_cap = pos;
|
|
pdev->pcie_cap = pos;
|
|
pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16);
|
|
pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16);
|
|
pdev->pcie_flags_reg = reg16;
|
|
pdev->pcie_flags_reg = reg16;
|
|
@@ -1176,13 +1177,14 @@ void set_pcie_port_type(struct pci_dev *pdev)
|
|
pdev->pcie_mpss = reg16 & PCI_EXP_DEVCAP_PAYLOAD;
|
|
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);
|
|
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;
|
|
pdev->has_secondary_link = 1;
|
|
else if (type == PCI_EXP_TYPE_UPSTREAM ||
|
|
else if (type == PCI_EXP_TYPE_UPSTREAM ||
|
|
type == PCI_EXP_TYPE_DOWNSTREAM) {
|
|
type == PCI_EXP_TYPE_DOWNSTREAM) {
|