Commit 8b5915b0 authored by Linus Torvalds's avatar Linus Torvalds

Take the whole PCI bus range into account when scanning PCI bridges.

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.
parent 538ce05c
...@@ -373,7 +373,10 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max ...@@ -373,7 +373,10 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
child->bridge_ctl = bctl; child->bridge_ctl = bctl;
cmax = pci_scan_child_bus(child); cmax = pci_scan_child_bus(child);
if (cmax > max) max = cmax; if (cmax > max)
max = cmax;
if (child->subordinate > max)
max = child->subordinate;
} else { } else {
/* /*
* We need to assign a number to this bus which we always * We need to assign a number to this bus which we always
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment