diff options
author | Rajesh Shah <rajesh.shah@intel.com> | 2005-04-28 03:25:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-28 00:52:41 -0400 |
commit | 542df5de56a23bf2d94b75e2b304ab0e5a5508a8 (patch) | |
tree | 6e9861262c3fb9cfa72a385ea8db5372c086e35b /drivers/pci | |
parent | 091ca9f06382e46d77213c35a97f7d0be9e350d2 (diff) |
[PATCH] acpi bridge hotadd: Remove hot-plugged devices that could not be allocated resources
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>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/setup-bus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 1ba84be0b4c0..6b628de948af 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -72,7 +72,10 @@ pbus_assign_resources_sorted(struct pci_bus *bus) | |||
72 | for (list = head.next; list;) { | 72 | for (list = head.next; list;) { |
73 | res = list->res; | 73 | res = list->res; |
74 | idx = res - &list->dev->resource[0]; | 74 | idx = res - &list->dev->resource[0]; |
75 | pci_assign_resource(list->dev, idx); | 75 | if (pci_assign_resource(list->dev, idx)) { |
76 | res->start = 0; | ||
77 | res->flags = 0; | ||
78 | } | ||
76 | tmp = list; | 79 | tmp = list; |
77 | list = list->next; | 80 | list = list->next; |
78 | kfree(tmp); | 81 | kfree(tmp); |