summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2011-09-02 17:06:50 +0000
committerdelphij <delphij@FreeBSD.org>2011-09-02 17:06:50 +0000
commitc440d00776b11f1134a6006a48e60741b69847e8 (patch)
treeefa92807876c5fbff852ce2fa79cbbb0c8071052
parentd9019754f9f486cd13acc9adc1883ff3a70cfb06 (diff)
downloadFreeBSD-src-c440d00776b11f1134a6006a48e60741b69847e8.zip
FreeBSD-src-c440d00776b11f1134a6006a48e60741b69847e8.tar.gz
Fix a bug in ichwd(4) which prevents it from beig enabled if the new
timeout is the same timeout. Submitted by: Dmitrij Tejblum <tejblum yandex-team.ru> PR: kern/139604 MFC after: 2 weeks Approved by: re (kib)
-rw-r--r--sys/dev/ichwd/ichwd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c
index a66826e..5d800c9 100644
--- a/sys/dev/ichwd/ichwd.c
+++ b/sys/dev/ichwd/ichwd.c
@@ -402,11 +402,10 @@ ichwd_event(void *arg, unsigned int cmd, int *error)
cmd &= WD_INTERVAL;
timeout = ((uint64_t)1 << cmd) / ICHWD_TICK;
if (cmd) {
- if (timeout != sc->timeout) {
- if (!sc->active)
- ichwd_tmr_enable(sc);
+ if (!sc->active)
+ ichwd_tmr_enable(sc);
+ if (timeout != sc->timeout)
ichwd_tmr_set(sc, timeout);
- }
ichwd_tmr_reload(sc);
*error = 0;
} else {
OpenPOWER on IntegriCloud