From patchwork Fri Mar 20 20:56:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Chiang X-Patchwork-Id: 13377 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2KKufK7001652 for ; Fri, 20 Mar 2009 20:56:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758123AbZCTU4T (ORCPT ); Fri, 20 Mar 2009 16:56:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758236AbZCTU4T (ORCPT ); Fri, 20 Mar 2009 16:56:19 -0400 Received: from g4t0016.houston.hp.com ([15.201.24.19]:30094 "EHLO g4t0016.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758123AbZCTU4R (ORCPT ); Fri, 20 Mar 2009 16:56:17 -0400 Received: from smtp2.fc.hp.com (smtp2.fc.hp.com [15.11.136.114]) by g4t0016.houston.hp.com (Postfix) with ESMTP id 1C38814219; Fri, 20 Mar 2009 20:56:16 +0000 (UTC) Received: from localhost.localdomain (lart.fc.hp.com [15.11.146.31]) by smtp2.fc.hp.com (Postfix) with ESMTP id 5F3D72BD791; Fri, 20 Mar 2009 20:32:48 +0000 (UTC) Received: from bob.kio (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id C9A872615B; Fri, 20 Mar 2009 14:56:15 -0600 (MDT) From: Alex Chiang Subject: [PATCH v5 05/13] PCI: do not initialize bridges more than once To: jbarnes@virtuousgeek.org Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Alex Chiang Date: Fri, 20 Mar 2009 14:56:15 -0600 Message-ID: <20090320205615.12275.97971.stgit@bob.kio> In-Reply-To: <20090320204327.12275.43010.stgit@bob.kio> References: <20090320204327.12275.43010.stgit@bob.kio> User-Agent: StGIT/0.14.3.215.gff3d MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org In preparation for PCI core hotplug, we need to ensure that we do not attempt to re-initialize bridges that have already been initialized. We only need to worry about non-root buses, since we will not allow root bus removal. Reported-by: Kenji Kaneshige Signed-off-by: Alex Chiang --- drivers/pci/setup-bus.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 170a3ed..334285a 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -144,6 +144,9 @@ static void pci_setup_bridge(struct pci_bus *bus) struct pci_bus_region region; u32 l, bu, lu, io_upper16; + if (!pci_is_root_bus(bus) && bus->is_added) + return; + dev_info(&bridge->dev, "PCI bridge, secondary bus %04x:%02x\n", pci_domain_nr(bus), bus->number);