]> err.no Git - linux-2.6/commitdiff
[PATCH] acpi bridge hotadd: Remove hot-plugged devices that could not be allocated...
authorRajesh Shah <rajesh.shah@intel.com>
Thu, 28 Apr 2005 07:25:50 +0000 (00:25 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 28 Jun 2005 04:52:41 +0000 (21:52 -0700)
When hot-plugging an I/O hierarchy that contains many bridges and leaf
devices, it's possible that there are not enough resources to start all the
device present.  If we fail to assign a resource, clear the corresponding
value in the pci_dev structure, so other code can take corrective action.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/setup-bus.c

index 1ba84be0b4c0fa041efcb9fc086302eaec887079..6b628de948af522fd3f00fdb7b4725a2c6cf275d 100644 (file)
@@ -72,7 +72,10 @@ pbus_assign_resources_sorted(struct pci_bus *bus)
        for (list = head.next; list;) {
                res = list->res;
                idx = res - &list->dev->resource[0];
-               pci_assign_resource(list->dev, idx);
+               if (pci_assign_resource(list->dev, idx)) {
+                       res->start = 0;
+                       res->flags = 0;
+               }
                tmp = list;
                list = list->next;
                kfree(tmp);