PCI: Add root bus children dev's res to fail list
authorYinghai Lu <yinghai@kernel.org>
Mon, 21 Jan 2013 21:20:43 +0000 (13:20 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 25 Jan 2013 20:45:00 +0000 (13:45 -0700)
We can stop trying according to try_number now and do not need to use
root_bus checking as stop sign.

In extreme case we could need to reallocate resource for device just
under root bus.  For PCI root bus hot-add, we need to retry to assign
resources to PCI devices just under pci root bus.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/setup-bus.c

index 6d3591d57ea00734148e48e8fb2774bc34bb81b6..7e8739e25b9ecddd9b52d19c7bfc486f8c3e7ac7 100644 (file)
@@ -283,7 +283,7 @@ static void assign_requested_resources_sorted(struct list_head *head,
                idx = res - &dev_res->dev->resource[0];
                if (resource_size(res) &&
                    pci_assign_resource(dev_res->dev, idx)) {
-                       if (fail_head && !pci_is_root_bus(dev_res->dev->bus)) {
+                       if (fail_head) {
                                /*
                                 * if the failed res is for ROM BAR, and it will
                                 * be enabled later, don't add it to the list