From 6056afe4069d814a416d75dc6e3f8a40ecd59f81 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 16 Sep 2011 05:57:01 +0000 Subject: MFC r225340: Fix a bug in ichwd(4) which prevents it from being enabled if the new timeout is the same timeout. Submitted by: Dmitrij Tejblum PR: kern/139604 --- sys/dev/ichwd/ichwd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c index 1775afcd6606..727012adbba1 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 { -- cgit v1.3