]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] EEH: Report errors as soon as possible
authorLinas Vepstas <linas@austin.ibm.com>
Thu, 15 Nov 2007 18:58:36 +0000 (05:58 +1100)
committerPaul Mackerras <paulus@samba.org>
Mon, 3 Dec 2007 02:56:26 +0000 (13:56 +1100)
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: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/eeh_driver.c

index 57e025e84ab4ae0132b3145c96689730989ef6f9..06b89b56d0e92a9dce9739af67d49e0a51df2ea1 100644 (file)
@@ -354,13 +354,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
        if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES)
                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
           "EEH: This PCI device has failed %d times in the last hour:\n",
                frozen_pdn->eeh_freeze_count);
@@ -376,6 +369,14 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
         */
        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,
         * don't post the error log until after all dev drivers
         * have been informed.