diff options
author | Ishizaki Kou <kou.ishizaki@toshiba.co.jp> | 2007-05-09 03:36:40 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-10 07:28:12 -0400 |
commit | 0f6e74a3e0c5e805d5f67f7631259c886158a47b (patch) | |
tree | 94dab1c8d2aba8a5f7af6d029b8a6d2f4ca90174 | |
parent | d1af5b4ea970d8cccdacf243ae42899f3784ad85 (diff) |
[POWERPC] celleb: Fix PCI config space accesses to subordinate buses
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>
-rw-r--r-- | arch/powerpc/platforms/celleb/scc_epci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c index fb23d53eb09c..c4b011094bd6 100644 --- a/arch/powerpc/platforms/celleb/scc_epci.c +++ b/arch/powerpc/platforms/celleb/scc_epci.c | |||
@@ -133,13 +133,13 @@ static int celleb_epci_check_abort(struct pci_controller *hose, | |||
133 | } | 133 | } |
134 | 134 | ||
135 | static volatile void __iomem *celleb_epci_make_config_addr( | 135 | static volatile void __iomem *celleb_epci_make_config_addr( |
136 | struct pci_bus *bus, | ||
136 | struct pci_controller *hose, | 137 | struct pci_controller *hose, |
137 | unsigned int devfn, int where) | 138 | unsigned int devfn, int where) |
138 | { | 139 | { |
139 | volatile void __iomem *addr; | 140 | volatile void __iomem *addr; |
140 | struct pci_bus *bus = hose->bus; | ||
141 | 141 | ||
142 | if (bus->self) | 142 | if (bus != hose->bus) |
143 | addr = celleb_epci_get_epci_cfg(hose) + | 143 | addr = celleb_epci_get_epci_cfg(hose) + |
144 | (((bus->number & 0xff) << 16) | 144 | (((bus->number & 0xff) << 16) |
145 | | ((devfn & 0xff) << 8) | 145 | | ((devfn & 0xff) << 8) |
@@ -193,7 +193,7 @@ static int celleb_epci_read_config(struct pci_bus *bus, | |||
193 | } else { | 193 | } else { |
194 | 194 | ||
195 | clear_and_disable_master_abort_interrupt(hose); | 195 | clear_and_disable_master_abort_interrupt(hose); |
196 | addr = celleb_epci_make_config_addr(hose, devfn, where); | 196 | addr = celleb_epci_make_config_addr(bus, hose, devfn, where); |
197 | 197 | ||
198 | switch (size) { | 198 | switch (size) { |
199 | case 1: | 199 | case 1: |
@@ -257,7 +257,7 @@ static int celleb_epci_write_config(struct pci_bus *bus, | |||
257 | } else { | 257 | } else { |
258 | 258 | ||
259 | clear_and_disable_master_abort_interrupt(hose); | 259 | clear_and_disable_master_abort_interrupt(hose); |
260 | addr = celleb_epci_make_config_addr(hose, devfn, where); | 260 | addr = celleb_epci_make_config_addr(bus, hose, devfn, where); |
261 | 261 | ||
262 | switch (size) { | 262 | switch (size) { |
263 | case 1: | 263 | case 1: |