[PATCH 2/4] celleb: fix pci config space accesses to subordinary buses

Ishizaki Kou kou.ishizaki at toshiba.co.jp
Wed May 9 17:36:40 EST 2007


Checking whether bus->self is NULL is not enough to know "bus" is the
primary bus.

Signed-off-by: Kou Ishizaki <kou.ishizaki at toshiba.co.jp>
---

Index: linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c
diff -u linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c:1.1.1.3 linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c:1.22
--- linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c:1.1.1.3	Thu Mar 15 10:41:25 2007
+++ linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c	Thu Mar 22 14:56:30 2007
@@ -133,13 +133,13 @@
 }
 
 static volatile void __iomem *celleb_epci_make_config_addr(
+					struct pci_bus *bus,
 					struct pci_controller *hose,
 					unsigned int devfn, int where)
 {
 	volatile void __iomem *addr;
-	struct pci_bus *bus = hose->bus;
 
-	if (bus->self)
+	if (bus != hose->bus)
 		addr = celleb_epci_get_epci_cfg(hose) +
 		       (((bus->number & 0xff) << 16)
 		        | ((devfn & 0xff) << 8)
@@ -193,7 +193,7 @@
 	} else {
 
 		clear_and_disable_master_abort_interrupt(hose);
-		addr = celleb_epci_make_config_addr(hose, devfn, where);
+		addr = celleb_epci_make_config_addr(bus, hose, devfn, where);
 
 		switch (size) {
 		case 1:
@@ -257,7 +257,7 @@
 	} else {
 
 		clear_and_disable_master_abort_interrupt(hose);
-		addr = celleb_epci_make_config_addr(hose, devfn, where);
+		addr = celleb_epci_make_config_addr(bus, hose, devfn, where);
 
 		switch (size) {
 		case 1:



More information about the Linuxppc-dev mailing list