[PATCH] pci: fixup parent subordinate busnr

I believe the change that broke things is introduction of
pci_fixup_parent_subordinate_busnr().

The patch here does two things:
- hunk #1 should fix the problems you've seen when you boot without
additional "pci" kernel options;
- hunk #2 supposedly fixes boot with "pci=assign-busses" option which
otherwise hangs Acer TM81xx machines as reported.

Please try this with and without "pci=assign-busses". If it boots,
I'd like to see 'lspci -vvx' for both cases.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Ivan Kokshaysky and committed by Linus Torvalds 12f44f46 bfab08c0

+17 -1
+17 -1
drivers/pci/probe.c
··· 402 static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) 403 { 404 struct pci_bus *parent = child->parent; 405 while (parent->parent && parent->subordinate < max) { 406 parent->subordinate = max; 407 pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); ··· 484 * We need to assign a number to this bus which we always 485 * do in the second pass. 486 */ 487 - if (!pass) 488 return max; 489 490 /* Clear errors */ 491 pci_write_config_word(dev, PCI_STATUS, 0xffff);
··· 402 static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) 403 { 404 struct pci_bus *parent = child->parent; 405 + 406 + /* Attempts to fix that up are really dangerous unless 407 + we're going to re-assign all bus numbers. */ 408 + if (!pcibios_assign_all_busses()) 409 + return; 410 + 411 while (parent->parent && parent->subordinate < max) { 412 parent->subordinate = max; 413 pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max); ··· 478 * We need to assign a number to this bus which we always 479 * do in the second pass. 480 */ 481 + if (!pass) { 482 + if (pcibios_assign_all_busses()) 483 + /* Temporarily disable forwarding of the 484 + configuration cycles on all bridges in 485 + this bus segment to avoid possible 486 + conflicts in the second pass between two 487 + bridges programmed with overlapping 488 + bus ranges. */ 489 + pci_write_config_dword(dev, PCI_PRIMARY_BUS, 490 + buses & ~0xffffff); 491 return max; 492 + } 493 494 /* Clear errors */ 495 pci_write_config_word(dev, PCI_STATUS, 0xffff);