From patchwork Tue Oct 14 06:49:47 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 4397 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 2D7F3DDF4E for ; Tue, 14 Oct 2008 17:51:28 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id 6607DDDE41; Tue, 14 Oct 2008 17:50:30 +1100 (EST) To: From: Benjamin Herrenschmidt Date: Tue, 14 Oct 2008 17:49:47 +1100 Subject: [PATCH] powerpc: Fix CHRP PCI config access for indirect_pci Message-Id: <20081014065031.6607DDDE41@ozlabs.org> X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Recently, indirect_pci was changed to test if the bus number requested is the one hanging straight off the PHB, then it substitutes the bus number with another one contained in a new "self_busno" field of the pci_controller structure. However, this breaks CHRP which didn't initialize this new field, and which relies on having the right bus number passed to the hardware. This fixes it by initializing this variable properly for all CHRP bridges Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/chrp/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-work.orig/arch/powerpc/platforms/chrp/pci.c 2008-10-14 17:35:12.000000000 +1100 +++ linux-work/arch/powerpc/platforms/chrp/pci.c 2008-10-14 17:35:18.000000000 +1100 @@ -263,7 +263,7 @@ chrp_find_bridges(void) dev->full_name); continue; } - hose->first_busno = bus_range[0]; + hose->first_busno = hose->self_busno = bus_range[0]; hose->last_busno = bus_range[1]; model = of_get_property(dev, "model", NULL);