A bridge that has been set up by firmware to cover multiple PCI
buses but doesn't actually have anything connected behind some of
them caused us to use the incorrect maxmimum bus number span when
scanning the bridge chip.
Problem reported by Tim Saunders, with Russell King suggesting
the fix.
child->bridge_ctl = bctl;
cmax = pci_scan_child_bus(child);
- if (cmax > max) max = cmax;
+ if (cmax > max)
+ max = cmax;
+ if (child->subordinate > max)
+ max = child->subordinate;
} else {
/*
* We need to assign a number to this bus which we always