提交 542df5de 编写于 作者: R Rajesh Shah 提交者: Greg Kroah-Hartman

[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: NRajesh Shah <rajesh.shah@intel.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 091ca9f0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册