From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yinghai Lu Subject: [PATCH v10 02/11] PCI: Add root bus children dev's res to fail list Date: Mon, 21 Jan 2013 13:20:43 -0800 Message-ID: <1358803252-20639-3-git-send-email-yinghai@kernel.org> References: <1358803252-20639-1-git-send-email-yinghai@kernel.org> Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:19715 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752600Ab3AUVVY (ORCPT ); Mon, 21 Jan 2013 16:21:24 -0500 In-Reply-To: <1358803252-20639-1-git-send-email-yinghai@kernel.org> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , Taku Izumi , Jiang Liu Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu 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 Acked-by: Rafael J. Wysocki --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 6d3591d..7e8739e 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -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 -- 1.7.10.4