Author: delphij
Date: Fri Sep  2 17:06:50 2011
New Revision: 225340
URL: http://svn.freebsd.org/changeset/base/225340

Log:
  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)

Modified:
  head/sys/dev/ichwd/ichwd.c

Modified: head/sys/dev/ichwd/ichwd.c
==============================================================================
--- head/sys/dev/ichwd/ichwd.c  Fri Sep  2 17:06:23 2011        (r225339)
+++ head/sys/dev/ichwd/ichwd.c  Fri Sep  2 17:06:50 2011        (r225340)
@@ -402,11 +402,10 @@ ichwd_event(void *arg, unsigned int cmd,
        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 {
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to