diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-02-05 21:57:47 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-02-05 23:28:11 +0100 |
commit | 5bbe029ff7bc8ff82ef31d3480d68c95642a3c7a (patch) | |
tree | c84de09e2bf7af2691b13ac15ab3a21684c608b4 /drivers/pci | |
parent | PCI/PME: Restructure pcie_pme_suspend() to prevent compiler warning (diff) | |
download | linux-5bbe029ff7bc8ff82ef31d3480d68c95642a3c7a.tar.xz linux-5bbe029ff7bc8ff82ef31d3480d68c95642a3c7a.zip |
PCI: Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h
The PCI flag management constants and functions were previously declared in
include/asm-generic/pci-bridge.h. But they are not specific to bridges,
and arches did not include pci-bridge.h consistently.
Move the following interfaces and related constants to include/linux/pci.h
and remove pci-bridge.h:
pci_set_flags()
pci_add_flags()
pci_clear_flags()
pci_has_flag()
This fixes these warnings when building for some arches:
drivers/pci/host/pcie-designware.c:562:20: error: 'PCI_PROBE_ONLY' undeclared (first use in this function)
drivers/pci/host/pcie-designware.c:562:7: error: implicit declaration of function 'pci_has_flag' [-Werror=implicit-function-declaration]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/probe.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 6d7ab9bb0d5a..ead1ac1dc1e3 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1803,6 +1803,13 @@ static int only_one_child(struct pci_bus *bus) return 0; if (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT) return 1; + + /* + * PCIe downstream ports are bridges that normally lead to only a + * device 0, but if PCI_SCAN_ALL_PCIE_DEVS is set, scan all + * possible devices, not just device 0. See PCIe spec r3.0, + * sec 7.3.1. + */ if (parent->has_secondary_link && !pci_has_flag(PCI_SCAN_ALL_PCIE_DEVS)) return 1; |