aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/eeh.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-03-19 16:01:31 -0400
committerPaul Mackerras <paulus@samba.org>2007-03-22 07:52:57 -0400
commit4980d5eb750288ffc0bb9daff3feb947e1bac61e (patch)
treeb9c8334610e1096b4c3f9a81928dd9d5ee384329 /arch/powerpc/platforms/pseries/eeh.c
parentfa1be476a2baa0961f63161caee6733cdc353adb (diff)
[POWERPC] EEH: restructure multi-function support
Rework how multi-function PCI devices are identified and traversed. This fixes a bug with multi-function recovery on Power4 that was introduced by a recent Power4 EEH patch. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh.c')
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index eac2a631c5a1..a56be71d1ede 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -282,7 +282,7 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag)
282 dn = find_device_pe (dn); 282 dn = find_device_pe (dn);
283 283
284 /* Back up one, since config addrs might be shared */ 284 /* Back up one, since config addrs might be shared */
285 if (PCI_DN(dn) && PCI_DN(dn)->eeh_pe_config_addr) 285 if (!pcibios_find_pci_bus(dn) && PCI_DN(dn->parent))
286 dn = dn->parent; 286 dn = dn->parent;
287 287
288 PCI_DN(dn)->eeh_mode |= mode_flag; 288 PCI_DN(dn)->eeh_mode |= mode_flag;
@@ -316,7 +316,7 @@ void eeh_clear_slot (struct device_node *dn, int mode_flag)
316 dn = find_device_pe (dn); 316 dn = find_device_pe (dn);
317 317
318 /* Back up one, since config addrs might be shared */ 318 /* Back up one, since config addrs might be shared */
319 if (PCI_DN(dn) && PCI_DN(dn)->eeh_pe_config_addr) 319 if (!pcibios_find_pci_bus(dn) && PCI_DN(dn->parent))
320 dn = dn->parent; 320 dn = dn->parent;
321 321
322 PCI_DN(dn)->eeh_mode &= ~mode_flag; 322 PCI_DN(dn)->eeh_mode &= ~mode_flag;