Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Sep 2011 17:06:51 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225340 - head/sys/dev/ichwd
Message-ID:  <201109021706.p82H6p8n008298@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109021706.p82H6p8n008298>