From cdd4eea9fca2d4b2edd85e3c29413ab9b0deaa46 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 2 Sep 2011 17:06:50 +0000 Subject: Fix a bug in ichwd(4) which prevents it from beig enabled if the new timeout is the same timeout. Submitted by: Dmitrij Tejblum PR: kern/139604 MFC after: 2 weeks Approved by: re (kib) --- 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 a66826e4c6e4..5d800c963e86 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.2.3