Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa1be476a2baa0961f63161caee6733cdc353adb
Commit:     fa1be476a2baa0961f63161caee6733cdc353adb
Parent:     d0ab95ca9854174029cef2f08acf1859441cb547
Author:     Linas Vepstas <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 19 14:59:59 2007 -0500
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Mar 22 22:52:56 2007 +1100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/pseries/eeh.c        |    6 +++++-
 arch/powerpc/platforms/pseries/eeh_driver.c |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/eeh.c 
b/arch/powerpc/platforms/pseries/eeh.c
index 1d05c9b..eac2a63 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)
                            function);
 
        if (rc)
-               printk(KERN_WARNING "EEH: Cannot enable function %d, err=%d 
dn=%s\n",
+               printk(KERN_WARNING "EEH: Unexpected state change %d, err=%d 
dn=%s\n",
                        function, rc, pdn->node->full_name);
 
+       rc = eeh_wait_for_slot_status (pdn, PCI_BUS_RESET_WAIT_MSEC);
+       if ((rc == 4) && (function == EEH_THAW_MMIO))
+               return 0;
+
        return rc;
 }
 
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c 
b/arch/powerpc/platforms/pseries/eeh_driver.c
index 6493f59..f5b4f7c 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)
 /* The longest amount of time to wait for a pci device
  * to come back on line, in seconds.
  */
-#define MAX_WAIT_FOR_RECOVERY 15
+#define MAX_WAIT_FOR_RECOVERY 150
 
 struct pci_dn * handle_eeh_events (struct eeh_event *event)
 {
@@ -393,6 +393,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
        if (result == PCI_ERS_RESULT_CAN_RECOVER) {
                rc = rtas_pci_enable(frozen_pdn, EEH_THAW_MMIO);
 
+               if (rc < 0)
+                       goto hard_fail;
                if (rc) {
                        result = PCI_ERS_RESULT_NEED_RESET;
                } else {
@@ -405,6 +407,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event)
        if (result == PCI_ERS_RESULT_CAN_RECOVER) {
                rc = rtas_pci_enable(frozen_pdn, EEH_THAW_DMA);
 
+               if (rc < 0)
+                       goto hard_fail;
                if (rc)
                        result = PCI_ERS_RESULT_NEED_RESET;
                else
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to