ipmi: Reset the KCS timeout when starting error recovery
authorCorey Minyard <cminyard@mvista.com>
Mon, 14 Apr 2014 14:46:52 +0000 (09:46 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Apr 2014 19:23:06 +0000 (12:23 -0700)
The OBF timer in KCS was not reset in one situation when error recovery
was started, resulting in an immediate timeout.

Reported-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ipmi/ipmi_kcs_sm.c

index 6a4bdc18955a52070d41af4adb61c6728248704a..8c25f596808a9a2b50d9f14b9a750b26fc079b74 100644 (file)
@@ -251,8 +251,9 @@ static inline int check_obf(struct si_sm_data *kcs, unsigned char status,
        if (!GET_STATUS_OBF(status)) {
                kcs->obf_timeout -= time;
                if (kcs->obf_timeout < 0) {
-                   start_error_recovery(kcs, "OBF not ready in time");
-                   return 1;
+                       kcs->obf_timeout = OBF_RETRY_TIMEOUT;
+                       start_error_recovery(kcs, "OBF not ready in time");
+                       return 1;
                }
                return 0;
        }