On Thu, 06 Dec 2007 19:11:36 +1100 Benjamin Herrenschmidt [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -316,19 +313,26 @@ void __devinit of_scan_bus(struct device
dev = of_create_pci_dev(child, bus, devfn);
if (!dev)
continue;
- DBG("dev header type: %x\n", dev->hdr_type);
+ DBG(" dev header type: %x\n", dev->hdr_type);
+ }
+
+ /* Ally all fixups */
+ pcibios_fixup_of_probed_bus(bus);
+ /* Now scan child busses */
+ list_for_each_entry(dev, &bus->devices, bus_list) {
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
- dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
- of_scan_pci_bridge(child, dev);
+ dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
+ struct device_node *child = pci_device_to_OF_node(dev);
+ if (dev)
^^^
child?
+ of_scan_pci_bridge(child, dev);
+ }
}
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/