device_t first, last;
first = *old_devices;
last = first;
- while(last && last->sibling &&
- (last->sibling->path.type == DEVICE_PATH_PCI) &&
- (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
+ while (last && last->sibling &&
+ (last->sibling->path.type == DEVICE_PATH_PCI) &&
+ (last->sibling->path.u.pci.devfn > last->path.u.pci.devfn)) {
last = last->sibling;
}
if (first) {
{
struct device *dev = 0;
+ printk_debug("%s, looking for devfn: %02x.%01x\n", __FUNCTION__,
+ devfn >> 3, devfn & 7);
for (; *list; list = &(*list)->sibling) {
if ((*list)->path.type != DEVICE_PATH_PCI) {
printk_err("child %s not a pci device\n",
}
}
+ printk_debug("%s, found dev %08x\n", __FUNCTION__, dev);
+
/* FIXME: why are we doing this ? Isn't there some order between the
* structures before ? */
if (dev) {
((unsigned int) (bus->secondary) << 8) |
((unsigned int) (bus->subordinate) << 16));
pci_write_config32(dev, PCI_PRIMARY_BUS, buses);
-
+
/* Now we can scan all subordinate buses i.e. the buses behind the
* bridge */
max = pci_scan_bus(bus, 0x00, 0xff, max);
-
+
/* We know the number of buses behind this bridge. Set the subordinate
* bus number to its real value */
bus->subordinate = max;