aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-05-07 09:23:27 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-05-07 09:23:27 -0600
commit0cbaa57d828aa0a067e06d3c6d795b12ae9fb776 (patch)
tree871e08f70566b16736ae228eddac018c77ca1144 /drivers/pci/probe.c
parentMAINTAINERS: update PCI git tree and patchwork (diff)
parentPCI: work around Stratus ftServer broken PCIe hierarchy (diff)
downloadlinux-dev-0cbaa57d828aa0a067e06d3c6d795b12ae9fb776.tar.xz
linux-dev-0cbaa57d828aa0a067e06d3c6d795b12ae9fb776.zip
Merge branch 'topic/stratus' into next
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 4c2f22668ea7..658ac977cb56 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -10,6 +10,7 @@
#include <linux/module.h>
#include <linux/cpumask.h>
#include <linux/pci-aspm.h>
+#include <asm-generic/pci-bridge.h>
#include "pci.h"
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
@@ -1336,10 +1337,13 @@ static unsigned no_next_fn(struct pci_dev *dev, unsigned fn)
static int only_one_child(struct pci_bus *bus)
{
struct pci_dev *parent = bus->self;
+
if (!parent || !pci_is_pcie(parent))
return 0;
- if (parent->pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
- parent->pcie_type == PCI_EXP_TYPE_DOWNSTREAM)
+ if (parent->pcie_type == PCI_EXP_TYPE_ROOT_PORT)
+ return 1;
+ if (parent->pcie_type == PCI_EXP_TYPE_DOWNSTREAM &&
+ !pci_has_flag(PCI_SCAN_ALL_PCIE_DEVS))
return 1;
return 0;
}