From: Andrew Morton <[email-masked]>

Cc: James Courtier-Dutton <[email-masked]>
Cc: Greg KH <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 arch/i386/pci/common.c  |    1 -
 arch/i386/pci/i386.c    |   11 +++--------
 drivers/pci/setup-bus.c |    2 --
 3 files changed, 3 insertions(+), 11 deletions(-)

diff -puN arch/i386/pci/common.c~revert-gregkh-pci-pci-assign-unassigned-resources arch/i386/pci/common.c
--- devel/arch/i386/pci/common.c~revert-gregkh-pci-pci-assign-unassigned-resources	2005-07-08 23:11:13.000000000 -0700
+++ devel-akpm/arch/i386/pci/common.c	2005-07-08 23:11:13.000000000 -0700
@@ -165,7 +165,6 @@ static int __init pcibios_init(void)
 	if ((pci_probe & PCI_BIOS_SORT) && !(pci_probe & PCI_NO_SORT))
 		pcibios_sort();
 #endif
-	pci_assign_unassigned_resources();
 	return 0;
 }
 
diff -puN arch/i386/pci/i386.c~revert-gregkh-pci-pci-assign-unassigned-resources arch/i386/pci/i386.c
--- devel/arch/i386/pci/i386.c~revert-gregkh-pci-pci-assign-unassigned-resources	2005-07-08 23:11:13.000000000 -0700
+++ devel-akpm/arch/i386/pci/i386.c	2005-07-08 23:11:13.000000000 -0700
@@ -106,16 +106,11 @@ static void __init pcibios_allocate_bus_
 		if ((dev = bus->self)) {
 			for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
 				r = &dev->resource[idx];
-				if (!r->flags)
+				if (!r->start)
 					continue;
 				pr = pci_find_parent_resource(dev, r);
-				if (!r->start || !pr || request_resource(pr, r) < 0) {
+				if (!pr || request_resource(pr, r) < 0)
 					printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev));
-					/* Something is wrong with the region.
-					   Invalidate the resource to prevent child
-					   resource allocations in this range. */
-					r->flags = 0;
-				}
 			}
 		}
 		pcibios_allocate_bus_resources(&bus->children);
@@ -232,7 +227,7 @@ int pcibios_enable_resources(struct pci_
 
 	pci_read_config_word(dev, PCI_COMMAND, &cmd);
 	old_cmd = cmd;
-	for(idx = 0; idx < PCI_NUM_RESOURCES; idx++) {
+	for(idx=0; idx<6; idx++) {
 		/* Only set up the requested stuff */
 		if (!(mask & (1<<idx)))
 			continue;
diff -puN drivers/pci/setup-bus.c~revert-gregkh-pci-pci-assign-unassigned-resources drivers/pci/setup-bus.c
--- devel/drivers/pci/setup-bus.c~revert-gregkh-pci-pci-assign-unassigned-resources	2005-07-08 23:11:13.000000000 -0700
+++ devel-akpm/drivers/pci/setup-bus.c	2005-07-08 23:11:13.000000000 -0700
@@ -274,8 +274,6 @@ find_free_bus_resource(struct pci_bus *b
 
 	for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
 		r = bus->resource[i];
-		if (r == &ioport_resource || r == &iomem_resource)
-			continue;
 		if (r && (r->flags & type_mask) == type && !r->parent)
 			return r;
 	}
_