Skip to content

Commit

Permalink
[PATCH] acpi bridge hotadd: Remove hot-plugged devices that could not…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Rajesh Shah authored and Greg Kroah-Hartman committed Jun 28, 2005
1 parent 091ca9f commit 542df5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 542df5d

Please sign in to comment.