summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoruebayasi <uebayasi@openbsd.org>2016-01-10 14:17:00 +0000
committeruebayasi <uebayasi@openbsd.org>2016-01-10 14:17:00 +0000
commit0728ef28a61bca940ea6125f7841cfa6cffbaf6c (patch)
treeed907566d470f589c45a914cd9227f70035cece5 /sys
parentSeems the voltage bit defenitions in sdmmcreg.h for voltages below 2V (diff)
downloadwireguard-openbsd-0728ef28a61bca940ea6125f7841cfa6cffbaf6c.tar.xz
wireguard-openbsd-0728ef28a61bca940ea6125f7841cfa6cffbaf6c.zip
When stopping wdog (via wdog_shutdown() e.g. before entering shutdown),
clear DONTSTOP bits. Without this, BMC records, at least on some NEC servers, watchdog timer expiration event, which only confuses admins. OK kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ipmi.c4
-rw-r--r--sys/dev/ipmivar.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c
index 9341a8846b1..c9e4c9f4f61 100644
--- a/sys/dev/ipmi.c
+++ b/sys/dev/ipmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmi.c,v 1.79 2016/01/09 05:51:54 uebayasi Exp $ */
+/* $OpenBSD: ipmi.c,v 1.80 2016/01/10 14:17:00 uebayasi Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@@ -1784,6 +1784,8 @@ ipmi_watchdog(void *arg, int period)
uint16_t timo = htole16(period * 10);
memcpy(&wdog[IPMI_SET_WDOG_TIMOL], &timo, 2);
+ wdog[IPMI_SET_WDOG_TIMER] &= ~IPMI_WDOG_DONTSTOP;
+ wdog[IPMI_SET_WDOG_TIMER] |= (period == 0) ? 0 : IPMI_WDOG_DONTSTOP;
wdog[IPMI_SET_WDOG_ACTION] &= ~IPMI_WDOG_MASK;
wdog[IPMI_SET_WDOG_ACTION] |= (period == 0) ? IPMI_WDOG_DISABLED :
IPMI_WDOG_REBOOT;
diff --git a/sys/dev/ipmivar.h b/sys/dev/ipmivar.h
index 53a9bfc1ad8..fb9f9169fbc 100644
--- a/sys/dev/ipmivar.h
+++ b/sys/dev/ipmivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmivar.h,v 1.19 2015/01/07 07:49:18 yasuoka Exp $ */
+/* $OpenBSD: ipmivar.h,v 1.20 2016/01/10 14:17:00 uebayasi Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@@ -114,6 +114,8 @@ struct ipmi_thread {
volatile int running;
};
+#define IPMI_WDOG_DONTSTOP 0x40
+
#define IPMI_WDOG_MASK 0x03
#define IPMI_WDOG_DISABLED 0x00
#define IPMI_WDOG_REBOOT 0x01