From owner-svn-src-head@FreeBSD.ORG Fri Sep 2 17:06:51 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 397141065677; Fri, 2 Sep 2011 17:06:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2917A8FC18; Fri, 2 Sep 2011 17:06:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p82H6p98008300; Fri, 2 Sep 2011 17:06:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p82H6p8n008298; Fri, 2 Sep 2011 17:06:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201109021706.p82H6p8n008298@svn.freebsd.org> From: Xin LI Date: Fri, 2 Sep 2011 17:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225340 - head/sys/dev/ichwd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 17:06:51 -0000 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 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 {