aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-03-19 15:59:59 -0400
committerPaul Mackerras <paulus@samba.org>2007-03-22 07:52:56 -0400
commitfa1be476a2baa0961f63161caee6733cdc353adb (patch)
treed847ecf51c128069049d35ed126c9beda4d879a7
parentd0ab95ca9854174029cef2f08acf1859441cb547 (diff)
[POWERPC] EEH: verify state change
After requesting a state change, verify that the state change actually ocurred, and the system ends up in the expected state. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c6
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 1d05c9b55605..eac2a631c5a1 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -527,9 +527,13 @@ rtas_pci_enable(struct pci_dn *pdn, int function)
527 function); 527 function);
528 528
529 if (rc) 529 if (rc)
530 printk(KERN_WARNING "EEH: Cannot enable function %d, err=%d dn=%s\n", 530 printk(KERN_WARNING "EEH: Unexpected state change %d, err=%d dn=%s\n",
531 function, rc, pdn->node->full_name); 531 function, rc, pdn->node->full_name);
532 532
533 rc = eeh_wait_for_slot_status (pdn, PCI_BUS_RESET_WAIT_MSEC);
534 if ((rc == 4) && (function == EEH_THAW_MMIO))
535 return 0;
536
533 return rc; 537 return rc;
534} 538}
535 539
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 6493f593687f..f5b4f7c20d7a 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -300,7 +300,7 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus)
300/* The longest amount of time to wait for a pci device 300/* The longest amount of time to wait for a pci device
301 * to come back on line, in seconds. 301 * to come back on line, in seconds.
302 */ 302 */
303#define MAX_WAIT_FOR_RECOVERY 15 303#define MAX_WAIT_FOR_RECOVERY 150
304 304
305struct pci_dn * handle_eeh_events (struct eeh_event *event) 305struct pci_dn * handle_eeh_events (struct eeh_event *event)
306{ 306{
@@ -393,6 +393,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
393 if (result == PCI_ERS_RESULT_CAN_RECOVER) { 393 if (result == PCI_ERS_RESULT_CAN_RECOVER) {
394 rc = rtas_pci_enable(frozen_pdn, EEH_THAW_MMIO); 394 rc = rtas_pci_enable(frozen_pdn, EEH_THAW_MMIO);
395 395
396 if (rc < 0)
397 goto hard_fail;
396 if (rc) { 398 if (rc) {
397 result = PCI_ERS_RESULT_NEED_RESET; 399 result = PCI_ERS_RESULT_NEED_RESET;
398 } else { 400 } else {
@@ -405,6 +407,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
405 if (result == PCI_ERS_RESULT_CAN_RECOVER) { 407 if (result == PCI_ERS_RESULT_CAN_RECOVER) {
406 rc = rtas_pci_enable(frozen_pdn, EEH_THAW_DMA); 408 rc = rtas_pci_enable(frozen_pdn, EEH_THAW_DMA);
407 409
410 if (rc < 0)
411 goto hard_fail;
408 if (rc) 412 if (rc)
409 result = PCI_ERS_RESULT_NEED_RESET; 413 result = PCI_ERS_RESULT_NEED_RESET;
410 else 414 else