]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
pci: Add is_pcierc element to struct pci_bus
authorDavid Daney <david.daney@cavium.com>
Wed, 15 Jul 2015 16:54:41 +0000 (09:54 -0700)
committerJulien Grall <julien.grall@citrix.com>
Mon, 28 Sep 2015 11:05:07 +0000 (12:05 +0100)
... and use is to force only_one_child() to return true.

Needed because the ThunderX PCIe RC cannot be identified by existing methods.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
drivers/pci/probe.c
include/linux/pci.h

index f6ae0d0052ebd2cd2da1f3e964ec579bf8690d04..b546c0a5ad4e874c44b5cd6526d6971f1f2a564b 100644 (file)
@@ -1648,6 +1648,8 @@ static int only_one_child(struct pci_bus *bus)
 {
        struct pci_dev *parent = bus->self;
 
+       if (bus->is_pcierc)
+               return 1;
        if (!parent || !pci_is_pcie(parent))
                return 0;
        if (pci_pcie_type(parent) == PCI_EXP_TYPE_ROOT_PORT)
index 860c751810fcce21c6950a6e91ca4a29c6947eca..b18189f1504c10820886912821d560b31fa044df 100644 (file)
@@ -473,6 +473,7 @@ struct pci_bus {
        struct bin_attribute    *legacy_io; /* legacy I/O for this bus */
        struct bin_attribute    *legacy_mem; /* legacy mem */
        unsigned int            is_added:1;
+       unsigned int            is_pcierc:1;
 };
 
 #define to_pci_bus(n)  container_of(n, struct pci_bus, dev)