DORMANTno replies

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

From: Ishizaki Kou <hidden>
Date: 2007-05-09 07:36:55

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

Signed-off-by: Kou Ishizaki <redacted>
---

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:
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help