aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-05-23 17:13:32 -0700
committerStewart Smith <stewart@linux.ibm.com>2018-06-04 00:00:55 -0500
commit651f2049feb3a6b00b04d69ad7f110450e7c4a80 (patch)
treee4fa49f4773d1af55c54a4455dcfce4534cb95e7 /hw
parent5b70462c73a803d15982fe6f2c6dad89b8a9c962 (diff)
downloadskiboot-651f2049feb3a6b00b04d69ad7f110450e7c4a80.zip
skiboot-651f2049feb3a6b00b04d69ad7f110450e7c4a80.tar.gz
skiboot-651f2049feb3a6b00b04d69ad7f110450e7c4a80.tar.bz2
ipmi-watchdog: The stop action should disable reset
Otherwise it is possible for the reset timer to elapse and trigger the watchdog to wake back up. This doesn't affect the behavior of the system since we are providing a NONE action to the BMC. However we would like to avoid the action from taking place if possible. Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/ipmi/ipmi-watchdog.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/ipmi/ipmi-watchdog.c b/hw/ipmi/ipmi-watchdog.c
index 778e655..201e9d1 100644
--- a/hw/ipmi/ipmi-watchdog.c
+++ b/hw/ipmi/ipmi-watchdog.c
@@ -114,6 +114,15 @@ static void reset_wdt(struct timer *t __unused, void *data __unused,
void ipmi_wdt_stop(void)
{
if (!wdt_stopped) {
+ /* Make sure the background reset timer is disabled before
+ * stopping the watchdog. If we issue a reset after disabling
+ * the timer, it will be re-enabled. */
+ wdt_ticking = false;
+ cancel_timer(&wdt_timer);
+
+ /* Configure the watchdog to be disabled and do no action
+ * in case the underlying implementation is buggy and times
+ * out anyway. */
wdt_stopped = true;
set_wdt(WDT_NO_ACTION, 100, 0, false);
}