]> err.no Git - linux-2.6/commitdiff
[POWERPC] celleb: Fix PCI config space accesses to subordinate buses
authorIshizaki Kou <kou.ishizaki@toshiba.co.jp>
Wed, 9 May 2007 07:36:40 +0000 (17:36 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 10 May 2007 11:28:12 +0000 (21:28 +1000)
Checking whether bus->self is NULL is not enough to know "bus" is the
primary bus.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/celleb/scc_epci.c

index fb23d53eb09c53cce17482905f95169c266de9b0..c4b011094bd678a64b92a00ff70cc277e5cda5cb 100644 (file)
@@ -133,13 +133,13 @@ static int celleb_epci_check_abort(struct pci_controller *hose,
 }
 
 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 @@ static int celleb_epci_read_config(struct pci_bus *bus,
        } 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 @@ static int celleb_epci_write_config(struct pci_bus *bus,
        } 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: