From owner-freebsd-stable@FreeBSD.ORG Tue Mar 13 15:45:58 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C91AD16A400 for ; Tue, 13 Mar 2007 15:45:58 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 84DD613C45E for ; Tue, 13 Mar 2007 15:45:58 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.13.6/8.13.6) with ESMTP id l2DFjvjE007198; Tue, 13 Mar 2007 11:45:57 -0400 (EDT) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id l2DFjvCK024125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Mar 2007 11:45:57 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <200703131545.l2DFjvCK024125@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Tue, 13 Mar 2007 11:45:33 -0400 To: Nick Hibma From: Mike Tancsa In-Reply-To: <20070313162641.S17388@localhost> References: <200702202256.l1KMuTPN046797@repoman.freebsd.org> <200703092140.l29LeUZ8002593@lava.sentex.ca> <200703131524.l2DFOSHY024018@lava.sentex.ca> <20070313162641.S17388@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on clamscanner2 X-Virus-Status: Clean Cc: freebsd-stable@freebsd.org Subject: Re: cvs commit: src/share/man/man4 Makefile watchdog.4 src/share/man/man9 watchdog.9 src/sys/arm/xscale/i80321 i80321_wdog.c src/sys/dev/ichwd ichwd.c src/sys/dev/ipmi ipmi.c src/sys/dev/mk48txx mk48txx.c src/sys/dev/watchdog watchdog.c ... X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 15:45:58 -0000 At 11:32 AM 3/13/2007, Nick Hibma wrote: >>Hi, >>I think the issue is that in the commit you wiped out the part >>where the dog gets enabled ? >> >>This diff against what you committed gets it working once again > >Yes, the enable is missing. The (untested) fix should be: Yup, the patch below works for me! ---Mike >--- ichwd.c~ Tue Feb 20 23:56:27 2007 >+++ ichwd.c Tue Mar 13 16:31:11 2007 >@@ -183,8 +183,11 @@ > timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; > if (cmd > 0 && cmd <= 63 > && timeout >= ICHWD_MIN_TIMEOUT && timeout <= > ICHWD_MAX_TIMEOUT) { >- if (timeout != sc->timeout) >+ if (timeout != sc->timeout) { >+ if (!sc->active) >+ ichwd_tmr_enable(sc); > ichwd_tmr_set(sc, timeout); >+ } > > ichwd_tmr_reload(sc); > *error = 0; > > >Nick > >> >> >>--- ichwd.c.old Tue Feb 20 17:56:27 2007 >>+++ ichwd.c Tue Mar 13 10:19:12 2007 >>@@ -178,6 +178,16 @@ >> struct ichwd_softc *sc = arg; >> unsigned int timeout; >> >>+/* disable / enable */ >>+ if (!(cmd & WD_ACTIVE)) { >>+ if (sc->active) >>+ ichwd_tmr_disable(sc); >>+ *error = 0; >>+ return; >>+ } >>+ if (!sc->active) >>+ ichwd_tmr_enable(sc); >>+ >> /* convert from power-of-two-ns to WDT ticks */ >> cmd &= WD_INTERVAL; >> timeout = ((uint64_t)1 << cmd) / ICHWD_TICK; >>@@ -189,8 +199,6 @@ >> ichwd_tmr_reload(sc); >> *error = 0; >> } else { >>- if (sc->active) >>- ichwd_tmr_disable(sc); >> if (cmd > 0) >> *error = EINVAL; >> } >> >> >> >> >>> ---Mike >>>At 05:56 PM 2/20/2007, Nick Hibma wrote: >>>>n_hibma 2007-02-20 22:56:29 UTC >>>> >>>> FreeBSD src repository >>>> >>>> Modified files: (Branch: RELENG_6) >>>> share/man/man4 Makefile watchdog.4 >>>> share/man/man9 watchdog.9 >>>> sys/arm/xscale/i80321 i80321_wdog.c >>>> sys/dev/ichwd ichwd.c >>>> sys/dev/ipmi ipmi.c >>>> sys/dev/mk48txx mk48txx.c >>>> sys/dev/watchdog watchdog.c >>>> sys/i386/i386 elan-mmcr.c >>>> sys/kern kern_clock.c >>>> sys/sys watchdog.h >>>> usr.sbin/watchdogd watchdog.8 watchdogd.c >>>> Log: >>>> MFC the following commits: >>>> >>>> Align the interfaces for the various watchdogs and make the interface >>>> behave as expected. >>>> >>>> Also: >>>> - Return an error if WD_PASSIVE is passed in to the ioctl as only >>>> WD_ACTIVE is implemented at the moment. See sys/watchdog.h for an >>>> explanation of the difference between WD_ACTIVE and WD_PASSIVE. >>>> - Remove the I_HAVE_TOTALLY_LOST_MY_SENSE_OF_HUMOR define. If you've >>>> lost your sense of humor, than don't add a define. >>>> >>>> Specific changes: >>>> >>>> i80321_wdog.c >>>> Don't roll your own passive watchdog tickle as this would defeat the >>>> purpose of an active (userland) watchdog tickle. >>>> >>>> ichwd.c / ipmi.c: >>>> WD_ACTIVE means active patting of the watchdog by a >>>> userland process, >>>> not whether the watchdog is active. See sys/watchdog.h. >>>> >>>> kern_clock.c: >>>> (software watchdog) Remove a check for WD_ACTIVE as this >>>> does not make >>>> sense here. This reverts r1.181. >>>> >>>> Revision Changes Path >>>> 1.371 +1 -0 src/share/man/man4/Makefile >>>> 1.8 +69 -25 src/share/man/man4/watchdog.4 >>>> 1.4 +7 -1 src/share/man/man9/watchdog.9 >>>> 1.3 +15 -11 src/sys/arm/xscale/i80321/i80321_wdog.c >>>> 1.7 +12 -30 src/sys/dev/ichwd/ichwd.c >>>> 1.8 +8 -17 src/sys/dev/ipmi/ipmi.c >>>> 1.8 +3 -1 src/sys/dev/mk48txx/mk48txx.c >>>> 1.4 +4 -1 src/sys/dev/watchdog/watchdog.c >>>> 1.33 +9 -9 src/sys/i386/i386/elan-mmcr.c >>>> 1.193 +3 -3 src/sys/kern/kern_clock.c >>>> 1.4 +0 -4 src/sys/sys/watchdog.h >>>> >>>> and >>>> >>>> Don't exit from watchdogd on receiving a signal if we cannot >>>> stop the watchdog. >>>> That'll require -KILL. This avoids resetting your system on one of the >>>> watchdogs that you cannot disable. >>>> >>>> Revision Changes Path >>>> 1.15 +18 -11 src/usr.sbin/watchdogd/watchdogd.c >>>> >>>> Reviewed by: phk >>>> >>>> Revision Changes Path >>>> 1.320.2.25 +1 -0 src/share/man/man4/Makefile >>>> 1.6.8.2 +69 -25 src/share/man/man4/watchdog.4 >>>> 1.3.8.1 +7 -1 src/share/man/man9/watchdog.9 >>>> 1.2.2.1 +15 -11 src/sys/arm/xscale/i80321/i80321_wdog.c >>>> 1.5.2.2 +12 -30 src/sys/dev/ichwd/ichwd.c >>>> 1.3.2.5 +6 -17 src/sys/dev/ipmi/ipmi.c >>>> 1.6.2.2 +3 -1 src/sys/dev/mk48txx/mk48txx.c >>>> 1.2.8.1 +9 -2 src/sys/dev/watchdog/watchdog.c >>>> 1.31.2.2 +9 -9 src/sys/i386/i386/elan-mmcr.c >>>> 1.178.2.4 +3 -3 src/sys/kern/kern_clock.c >>>> 1.3.8.1 +0 -4 src/sys/sys/watchdog.h >>>> 1.6.2.1 +5 -4 src/usr.sbin/watchdogd/watchdog.8 >>>> 1.10.2.2 +19 -13 src/usr.sbin/watchdogd/watchdogd.c >>>>_______________________________________________ >>>>cvs-all@freebsd.org mailing list >>>>http://lists.freebsd.org/mailman/listinfo/cvs-all >>>>To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" >>>_______________________________________________ >>>freebsd-stable@freebsd.org mailing list >>>http://lists.freebsd.org/mailman/listinfo/freebsd-stable >>>To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >>