diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-12-06 13:32:20 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-08 01:10:18 -0500 |
commit | d0e70341c05f6c31375530e0ae29b319153004a7 (patch) | |
tree | a3352c84ca78be992f3a44b721df80b19192e585 /arch | |
parent | 3a1d1ac279fac16ab1b41b2868478f3085f9223c (diff) |
[POWERPC] EEH recovery tweaks
If one attempts to create a device driver recovery sequence that
does not depend on a hard reset of the device, but simply just
attempts to resume processing, then one discovers that the
recovery sequence implemented on powerpc is not quite right.
This patch fixes this up.
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 | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_driver.c | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 3c2d63ebf787..da6e5362e7cd 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -337,6 +337,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
337 | printk (KERN_ERR "EEH: Device driver ignored %d bad reads, panicing\n", | 337 | printk (KERN_ERR "EEH: Device driver ignored %d bad reads, panicing\n", |
338 | pdn->eeh_check_count); | 338 | pdn->eeh_check_count); |
339 | dump_stack(); | 339 | dump_stack(); |
340 | msleep(5000); | ||
340 | 341 | ||
341 | /* re-read the slot reset state */ | 342 | /* re-read the slot reset state */ |
342 | if (read_slot_reset_state(pdn, rets) != 0) | 343 | if (read_slot_reset_state(pdn, rets) != 0) |
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index c2bc9904f1cb..cbd6b0711ab4 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -170,14 +170,19 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata) | |||
170 | static void eeh_report_resume(struct pci_dev *dev, void *userdata) | 170 | static void eeh_report_resume(struct pci_dev *dev, void *userdata) |
171 | { | 171 | { |
172 | struct pci_driver *driver = dev->driver; | 172 | struct pci_driver *driver = dev->driver; |
173 | struct device_node *dn = pci_device_to_OF_node(dev); | ||
173 | 174 | ||
174 | dev->error_state = pci_channel_io_normal; | 175 | dev->error_state = pci_channel_io_normal; |
175 | 176 | ||
176 | if (!driver) | 177 | if (!driver) |
177 | return; | 178 | return; |
178 | if (!driver->err_handler) | 179 | |
179 | return; | 180 | if ((PCI_DN(dn)->eeh_mode) & EEH_MODE_IRQ_DISABLED) { |
180 | if (!driver->err_handler->resume) | 181 | PCI_DN(dn)->eeh_mode &= ~EEH_MODE_IRQ_DISABLED; |
182 | enable_irq(dev->irq); | ||
183 | } | ||
184 | if (!driver->err_handler || | ||
185 | !driver->err_handler->resume) | ||
181 | return; | 186 | return; |
182 | 187 | ||
183 | driver->err_handler->resume(dev); | 188 | driver->err_handler->resume(dev); |
@@ -407,6 +412,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
407 | 412 | ||
408 | if (rc) | 413 | if (rc) |
409 | result = PCI_ERS_RESULT_NEED_RESET; | 414 | result = PCI_ERS_RESULT_NEED_RESET; |
415 | else | ||
416 | result = PCI_ERS_RESULT_RECOVERED; | ||
410 | } | 417 | } |
411 | 418 | ||
412 | /* If any device has a hard failure, then shut off everything. */ | 419 | /* If any device has a hard failure, then shut off everything. */ |