aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/eeh_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/eeh_driver.c')
-rw-r--r--arch/powerpc/kernel/eeh_driver.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 0974e1326842..2b1ce17cae50 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -425,6 +425,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
425 * status ... if any child can't handle the reset, then the entire 425 * status ... if any child can't handle the reset, then the entire
426 * slot is dlpar removed and added. 426 * slot is dlpar removed and added.
427 */ 427 */
428 pr_info("EEH: Notify device drivers to shutdown\n");
428 eeh_pe_dev_traverse(pe, eeh_report_error, &result); 429 eeh_pe_dev_traverse(pe, eeh_report_error, &result);
429 430
430 /* Get the current PCI slot state. This can take a long time, 431 /* Get the current PCI slot state. This can take a long time,
@@ -432,7 +433,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
432 */ 433 */
433 rc = eeh_ops->wait_state(pe, MAX_WAIT_FOR_RECOVERY*1000); 434 rc = eeh_ops->wait_state(pe, MAX_WAIT_FOR_RECOVERY*1000);
434 if (rc < 0 || rc == EEH_STATE_NOT_SUPPORT) { 435 if (rc < 0 || rc == EEH_STATE_NOT_SUPPORT) {
435 printk(KERN_WARNING "EEH: Permanent failure\n"); 436 pr_warning("EEH: Permanent failure\n");
436 goto hard_fail; 437 goto hard_fail;
437 } 438 }
438 439
@@ -440,6 +441,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
440 * don't post the error log until after all dev drivers 441 * don't post the error log until after all dev drivers
441 * have been informed. 442 * have been informed.
442 */ 443 */
444 pr_info("EEH: Collect temporary log\n");
443 eeh_slot_error_detail(pe, EEH_LOG_TEMP); 445 eeh_slot_error_detail(pe, EEH_LOG_TEMP);
444 446
445 /* If all device drivers were EEH-unaware, then shut 447 /* If all device drivers were EEH-unaware, then shut
@@ -447,15 +449,18 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
447 * go down willingly, without panicing the system. 449 * go down willingly, without panicing the system.
448 */ 450 */
449 if (result == PCI_ERS_RESULT_NONE) { 451 if (result == PCI_ERS_RESULT_NONE) {
452 pr_info("EEH: Reset with hotplug activity\n");
450 rc = eeh_reset_device(pe, frozen_bus); 453 rc = eeh_reset_device(pe, frozen_bus);
451 if (rc) { 454 if (rc) {
452 printk(KERN_WARNING "EEH: Unable to reset, rc=%d\n", rc); 455 pr_warning("%s: Unable to reset, err=%d\n",
456 __func__, rc);
453 goto hard_fail; 457 goto hard_fail;
454 } 458 }
455 } 459 }
456 460
457 /* If all devices reported they can proceed, then re-enable MMIO */ 461 /* If all devices reported they can proceed, then re-enable MMIO */
458 if (result == PCI_ERS_RESULT_CAN_RECOVER) { 462 if (result == PCI_ERS_RESULT_CAN_RECOVER) {
463 pr_info("EEH: Enable I/O for affected devices\n");
459 rc = eeh_pci_enable(pe, EEH_OPT_THAW_MMIO); 464 rc = eeh_pci_enable(pe, EEH_OPT_THAW_MMIO);
460 465
461 if (rc < 0) 466 if (rc < 0)
@@ -463,6 +468,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
463 if (rc) { 468 if (rc) {
464 result = PCI_ERS_RESULT_NEED_RESET; 469 result = PCI_ERS_RESULT_NEED_RESET;
465 } else { 470 } else {
471 pr_info("EEH: Notify device drivers to resume I/O\n");
466 result = PCI_ERS_RESULT_NONE; 472 result = PCI_ERS_RESULT_NONE;
467 eeh_pe_dev_traverse(pe, eeh_report_mmio_enabled, &result); 473 eeh_pe_dev_traverse(pe, eeh_report_mmio_enabled, &result);
468 } 474 }
@@ -470,6 +476,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
470 476
471 /* If all devices reported they can proceed, then re-enable DMA */ 477 /* If all devices reported they can proceed, then re-enable DMA */
472 if (result == PCI_ERS_RESULT_CAN_RECOVER) { 478 if (result == PCI_ERS_RESULT_CAN_RECOVER) {
479 pr_info("EEH: Enabled DMA for affected devices\n");
473 rc = eeh_pci_enable(pe, EEH_OPT_THAW_DMA); 480 rc = eeh_pci_enable(pe, EEH_OPT_THAW_DMA);
474 481
475 if (rc < 0) 482 if (rc < 0)
@@ -482,17 +489,22 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
482 489
483 /* If any device has a hard failure, then shut off everything. */ 490 /* If any device has a hard failure, then shut off everything. */
484 if (result == PCI_ERS_RESULT_DISCONNECT) { 491 if (result == PCI_ERS_RESULT_DISCONNECT) {
485 printk(KERN_WARNING "EEH: Device driver gave up\n"); 492 pr_warning("EEH: Device driver gave up\n");
486 goto hard_fail; 493 goto hard_fail;
487 } 494 }
488 495
489 /* If any device called out for a reset, then reset the slot */ 496 /* If any device called out for a reset, then reset the slot */
490 if (result == PCI_ERS_RESULT_NEED_RESET) { 497 if (result == PCI_ERS_RESULT_NEED_RESET) {
498 pr_info("EEH: Reset without hotplug activity\n");
491 rc = eeh_reset_device(pe, NULL); 499 rc = eeh_reset_device(pe, NULL);
492 if (rc) { 500 if (rc) {
493 printk(KERN_WARNING "EEH: Cannot reset, rc=%d\n", rc); 501 pr_warning("%s: Cannot reset, err=%d\n",
502 __func__, rc);
494 goto hard_fail; 503 goto hard_fail;
495 } 504 }
505
506 pr_info("EEH: Notify device drivers "
507 "the completion of reset\n");
496 result = PCI_ERS_RESULT_NONE; 508 result = PCI_ERS_RESULT_NONE;
497 eeh_pe_dev_traverse(pe, eeh_report_reset, &result); 509 eeh_pe_dev_traverse(pe, eeh_report_reset, &result);
498 } 510 }
@@ -500,11 +512,12 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
500 /* All devices should claim they have recovered by now. */ 512 /* All devices should claim they have recovered by now. */
501 if ((result != PCI_ERS_RESULT_RECOVERED) && 513 if ((result != PCI_ERS_RESULT_RECOVERED) &&
502 (result != PCI_ERS_RESULT_NONE)) { 514 (result != PCI_ERS_RESULT_NONE)) {
503 printk(KERN_WARNING "EEH: Not recovered\n"); 515 pr_warning("EEH: Not recovered\n");
504 goto hard_fail; 516 goto hard_fail;
505 } 517 }
506 518
507 /* Tell all device drivers that they can resume operations */ 519 /* Tell all device drivers that they can resume operations */
520 pr_info("EEH: Notify device driver to resume\n");
508 eeh_pe_dev_traverse(pe, eeh_report_resume, NULL); 521 eeh_pe_dev_traverse(pe, eeh_report_resume, NULL);
509 522
510 return; 523 return;