From owner-freebsd-current@FreeBSD.ORG Sun Dec 10 15:29:22 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EECF516A533 for ; Sun, 10 Dec 2006 15:29:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B9C743E4D for ; Sun, 10 Dec 2006 15:26:47 +0000 (GMT) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.13.8/8.13.8/ALCHEMY.FRANKEN.DE) with ESMTP id kBAFRt00046406; Sun, 10 Dec 2006 16:27:55 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.13.8/8.13.8/Submit) id kBAFRtMC046405; Sun, 10 Dec 2006 16:27:55 +0100 (CET) (envelope-from marius) Date: Sun, 10 Dec 2006 16:27:55 +0100 From: Marius Strobl To: Nick Hibma Message-ID: <20061210152755.GA45265@alchemy.franken.de> References: <20061210110419.H42195@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061210110419.H42195@localhost> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD CURRENT Mailing List Subject: Re: Slight interface change on the watchdog fido X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Dec 2006 15:29:23 -0000 On Sun, Dec 10, 2006 at 11:04:39AM +0100, Nick Hibma wrote: > I'm planning on committing the following change to make the implementations > of the various hardware watchdogs more consistent. A timeout of 0 passed to > the ioctl is now a valid input and will disable the watchdog. Previously it > produced an error for the Elan chip watchdog, which is _not_ what you want > to see when disarming a watchdog :-) I'd appreciate review of the > individual changes in the files by the following people. The change as a > whole was discussed with phk. > > cognet@freebsd.org i80321_wdog.c (*) > des ichwd.c (**) > ambrisko ipmi.c > marius mk48txx.c > phk kern_clock.c, elan-mmcr.c, watchdog.c (**) > > (*) The i80321_wdog.c cannot be disarmed. Is this correct? > (**) These have been tested to arm, disarm, and fire. Others have only been > compile tested. > > This change has been tested on 6.2-STABLE and 7-CURRENT. > > > Commit message: > > Convert all watchdog event handlers to the following format: > > - If the timeout value passed is >0 and acceptable arm the watchdog and set > the *error to 0 (a watchdog is armed). > - Otherwise disarm the watchdog and leave *error as is (valid disarm). > - If the timeout value passed is 0, disarm the watchdog. set *error to an > error if disarm failed. > I recognise this as the previous watchdog function API with the extension that when told to disarm via a timeout value of 0 the watchdog may now report failure to do so by setting *error, correct? If so this is fine with the stock mk48txx.c. Regarding your changes to watchdog.4 and watchdog.9 AFAICT they violate the established style guidelines for FreeBSD man pages; the source should wrap the line on sentence breaks. Marius