提交 5f1a7c81 编写于 作者: L Linas Vepstas 提交者: Paul Mackerras

[POWERPC] EEH: Report errors as soon as possible

Do not wait for the pci slot status before reporting an error
to the device driver. Some systems may take many seconds to
report the slot status, and this can confuse unsuspecting
device drivers.
Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 c9b65a7d
...@@ -354,13 +354,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) ...@@ -354,13 +354,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
goto excess_failures; goto excess_failures;
/* Get the current PCI slot state. */
rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
if (rc < 0) {
printk(KERN_WARNING "EEH: Permanent failure\n");
goto hard_fail;
}
printk(KERN_WARNING printk(KERN_WARNING
"EEH: This PCI device has failed %d times in the last hour:\n", "EEH: This PCI device has failed %d times in the last hour:\n",
frozen_pdn->eeh_freeze_count); frozen_pdn->eeh_freeze_count);
...@@ -376,6 +369,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) ...@@ -376,6 +369,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
*/ */
pci_walk_bus(frozen_bus, eeh_report_error, &result); pci_walk_bus(frozen_bus, eeh_report_error, &result);
/* Get the current PCI slot state. This can take a long time,
* sometimes over 3 seconds for certain systems. */
rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000);
if (rc < 0) {
printk(KERN_WARNING "EEH: Permanent failure\n");
goto hard_fail;
}
/* Since rtas may enable MMIO when posting the error log, /* Since rtas may enable MMIO when posting the error log,
* don't post the error log until after all dev drivers * don't post the error log until after all dev drivers
* have been informed. * have been informed.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册