]> git.neil.brown.name Git - history.git/commitdiff
Take the whole PCI bus range into account when scanning PCI bridges.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 14 Oct 2004 04:03:12 +0000 (21:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 14 Oct 2004 04:03:12 +0000 (21:03 -0700)
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.

drivers/pci/probe.c

index b57fe552411341f2a720ac5c2ecd6ca4acc1077d..e88017d6fd38922c031fc5f6ad74cfba89c8aa02 100644 (file)
@@ -373,7 +373,10 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
                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