Patchwork powerpc: Fix CHRP PCI config access for indirect_pci

login
register
mail settings
Submitter Benjamin Herrenschmidt
Date Oct. 14, 2008, 6:49 a.m.
Message ID <20081014065031.6607DDDE41@ozlabs.org>
Download mbox | patch
Permalink /patch/4397/
State Accepted, archived
Commit ee673eaa72d8d185012b1027a05e25aba18c267f
Headers show

Comments

Benjamin Herrenschmidt - Oct. 14, 2008, 6:49 a.m.
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 <benh@kernel.crashing.org>
---

 arch/powerpc/platforms/chrp/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

--- 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);