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)
This commit is contained in:
Xin LI 2011-09-02 17:06:50 +00:00
parent d1f97f76a5
commit cdd4eea9fc

View File

@ -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 {