diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-09-25 19:01:42 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-09-26 01:41:03 -0400 |
commit | 022d51b1b28d25d50935c39d7968fefe34102a9f (patch) | |
tree | a0c821bc88572a77be2caa9623bb16310049d527 /arch | |
parent | 2cec1b452c2cb6abf0589f35b69ce09c3e612bb4 (diff) |
[POWERPC] EEH failure to mark pci slot as frozen.
Bug fix: when marking a slot as frozen, we forgot to mark
pci device itself as frozen. (we did manage to mark the
pci children, but forget the parent itself.)
This is needed so that some device drivers can check the
pci status in critical sections (e.g. in spin loops with
interrupts disabled).
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 84bc8f7e17ef..3c2d63ebf787 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -225,6 +225,7 @@ static void __eeh_mark_slot (struct device_node *dn, int mode_flag) | |||
225 | 225 | ||
226 | void eeh_mark_slot (struct device_node *dn, int mode_flag) | 226 | void eeh_mark_slot (struct device_node *dn, int mode_flag) |
227 | { | 227 | { |
228 | struct pci_dev *dev; | ||
228 | dn = find_device_pe (dn); | 229 | dn = find_device_pe (dn); |
229 | 230 | ||
230 | /* Back up one, since config addrs might be shared */ | 231 | /* Back up one, since config addrs might be shared */ |
@@ -232,6 +233,12 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag) | |||
232 | dn = dn->parent; | 233 | dn = dn->parent; |
233 | 234 | ||
234 | PCI_DN(dn)->eeh_mode |= mode_flag; | 235 | PCI_DN(dn)->eeh_mode |= mode_flag; |
236 | |||
237 | /* Mark the pci device too */ | ||
238 | dev = PCI_DN(dn)->pcidev; | ||
239 | if (dev) | ||
240 | dev->error_state = pci_channel_io_frozen; | ||
241 | |||
235 | __eeh_mark_slot (dn->child, mode_flag); | 242 | __eeh_mark_slot (dn->child, mode_flag); |
236 | } | 243 | } |
237 | 244 | ||