]> git.hungrycats.org Git - linux/commitdiff
Use "request_resource()" to properly fix up PCI resource clashes.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 10 Oct 2004 03:21:04 +0000 (20:21 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 10 Oct 2004 03:21:04 +0000 (20:21 -0700)
This is made possible by the previous resource allocation ordering
patch.

Now that we run the pre-existing PCI resource discovery _before_
ACPI resources have been added, we should not "insert" the resources
into any existing tree. If they clash with existing resources, we
should re-allocate them (later, when we have the full resource map).

arch/i386/pci/i386.c

index b171e22838d130c62470d23b12c3dd8cf536e757..ec859ad0e7daf66d4e82aaaeb06abb3de5ad6591 100644 (file)
@@ -142,7 +142,7 @@ static void __init pcibios_allocate_resources(int pass)
                                DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
                                    r->start, r->end, r->flags, disabled, pass);
                                pr = pci_find_parent_resource(dev, r);
-                               if (!pr || insert_resource(pr, r) < 0) {
+                               if (!pr || request_resource(pr, r) < 0) {
                                        printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
                                        /* We'll assign a new address later */
                                        r->end -= r->start;