Merge tag 'for-linus-4.13-v2' of git://github.com/cminyard/linux-ipmi
[platform/kernel/linux-rpi.git] / drivers / char / ipmi / ipmi_watchdog.c
index a5c6cfe..3d832d0 100644 (file)
@@ -1163,10 +1163,11 @@ static int wdog_reboot_handler(struct notifier_block *this,
                        ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
                        ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
                } else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
-                       /* Set a long timer to let the reboot happens, but
-                          reboot if it hangs, but only if the watchdog
+                       /* Set a long timer to let the reboot happen or
+                          reset if it hangs, but only if the watchdog
                           timer was already running. */
-                       timeout = 120;
+                       if (timeout < 120)
+                               timeout = 120;
                        pretimeout = 0;
                        ipmi_watchdog_state = WDOG_TIMEOUT_RESET;
                        ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);