From patchwork Fri Jan 18 07:53:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 2000171 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BB3313FD86 for ; Fri, 18 Jan 2013 07:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751383Ab3ARH4K (ORCPT ); Fri, 18 Jan 2013 02:56:10 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:17810 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025Ab3ARHxk (ORCPT ); Fri, 18 Jan 2013 02:53:40 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0I7rSba011618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Jan 2013 07:53:28 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0I7rRhU024026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 07:53:28 GMT Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r0I7rREL024285; Fri, 18 Jan 2013 01:53:27 -0600 Received: from linux-siqj.site (/75.36.247.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 17 Jan 2013 23:53:26 -0800 From: Yinghai Lu 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 Subject: [PATCH v9 02/11] PCI: Add root bus children dev's res to fail list Date: Thu, 17 Jan 2013 23:53:13 -0800 Message-Id: <1358495602-22867-3-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358495602-22867-1-git-send-email-yinghai@kernel.org> References: <1358495602-22867-1-git-send-email-yinghai@kernel.org> X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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