diff options
| -rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 44abdeb9ca03..b3c2dcb1e4f0 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
| @@ -152,20 +152,24 @@ pcibios_pci_config_bridge(struct pci_dev *dev) | |||
| 152 | void | 152 | void |
| 153 | pcibios_add_pci_devices(struct pci_bus * bus) | 153 | pcibios_add_pci_devices(struct pci_bus * bus) |
| 154 | { | 154 | { |
| 155 | int slotno, num; | 155 | int slotno, num, mode; |
| 156 | struct pci_dev *dev; | 156 | struct pci_dev *dev; |
| 157 | struct device_node *dn = pci_bus_to_OF_node(bus); | 157 | struct device_node *dn = pci_bus_to_OF_node(bus); |
| 158 | 158 | ||
| 159 | eeh_add_device_tree_early(dn); | 159 | eeh_add_device_tree_early(dn); |
| 160 | 160 | ||
| 161 | if (_machine == PLATFORM_PSERIES_LPAR) { | 161 | mode = PCI_PROBE_NORMAL; |
| 162 | if (ppc_md.pci_probe_mode) | ||
| 163 | mode = ppc_md.pci_probe_mode(bus); | ||
| 164 | |||
| 165 | if (mode == PCI_PROBE_DEVTREE) { | ||
| 162 | /* use ofdt-based probe */ | 166 | /* use ofdt-based probe */ |
| 163 | of_scan_bus(dn, bus); | 167 | of_scan_bus(dn, bus); |
| 164 | if (!list_empty(&bus->devices)) { | 168 | if (!list_empty(&bus->devices)) { |
| 165 | pcibios_fixup_new_pci_devices(bus, 0); | 169 | pcibios_fixup_new_pci_devices(bus, 0); |
| 166 | pci_bus_add_devices(bus); | 170 | pci_bus_add_devices(bus); |
| 167 | } | 171 | } |
| 168 | } else { | 172 | } else if (mode == PCI_PROBE_NORMAL) { |
| 169 | /* use legacy probe */ | 173 | /* use legacy probe */ |
| 170 | slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); | 174 | slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); |
| 171 | num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); | 175 | num = pci_scan_slot(bus, PCI_DEVFN(slotno, 0)); |
