svn commit: r225340 - head/sys/dev/ichwd

Xin LI delphij at FreeBSD.org
Fri Sep 2 17:06:51 UTC 2011


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 {


More information about the svn-src-head mailing list