public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <cminyard@mvista.com>
To: Arkadiusz Miskiewicz <arekm@pld-linux.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH]: convert ipmi_watchdog to also use module option nowayout as it's done in other watchdog drivers
Date: Wed, 28 Jul 2004 09:16:00 -0500	[thread overview]
Message-ID: <4107B520.1060506@mvista.com> (raw)
In-Reply-To: <200407281141.13362.arekm@pld-linux.org>

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

>
>
>Convert ipmi_watchdog to also use module option ,,nowayout'' as it's done in other watchdog drivers.
>  
>
The patch is good (same style as other watchdogs), but needs to have some documentation updated.  I've tacked that on.


Signed-off-by: Arkadiusz Miskiewicz <arekm@pld-linux.org>
Signed-off-by: Corey Minyard <minyard@acm.org>


[-- Attachment #2: ipmi-wdog-nowayout.diff --]
[-- Type: text/plain, Size: 2566 bytes --]

Index: linux-ipmi/Documentation/IPMI.txt
===================================================================
--- linux-ipmi.orig/Documentation/IPMI.txt	2004-05-21 11:48:29.000000000 -0500
+++ linux-ipmi/Documentation/IPMI.txt	2004-07-28 09:12:42.000000000 -0500
@@ -442,6 +442,7 @@
 
   modprobe ipmi_watchdog timeout=<t> pretimeout=<t> action=<action type>
       preaction=<preaction type> preop=<preop type> start_now=x
+      nowayout=x
 
 The timeout is the number of seconds to the action, and the pretimeout
 is the amount of seconds before the reset that the pre-timeout panic will
@@ -472,6 +473,10 @@
 If start_now is set to 1, the watchdog timer will start running as
 soon as the driver is loaded.
 
+If nowayout is set to 1, the watchdog timer will not stop when the
+watchdog device is closed.  The default value of nowayout is true
+if the CONFIG_WATCHDOG_NOWAYOUT option is enabled, or false if not.
+
 When compiled into the kernel, the kernel command line is available
 for configuring the watchdog:
 
@@ -480,6 +485,7 @@
 	ipmi_watchdog.preaction=<preaction type>
 	ipmi_watchdog.preop=<preop type>
 	ipmi_watchdog.start_now=x
+	ipmi_watchdog.nowayout=x
 
 The options are the same as the module parameter options.
 
Index: linux-ipmi/drivers/char/ipmi/ipmi_watchdog.c
===================================================================
--- linux-ipmi.orig/drivers/char/ipmi/ipmi_watchdog.c	2004-07-28 09:09:25.000000000 -0500
+++ linux-ipmi/drivers/char/ipmi/ipmi_watchdog.c	2004-07-28 09:10:40.000000000 -0500
@@ -129,6 +129,12 @@
 #define	WDIOC_GET_PRETIMEOUT     _IOW(WATCHDOG_IOCTL_BASE, 22, int)
 #endif
 
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
 static ipmi_user_t watchdog_user = NULL;
 
 /* Default the timeout to 10 seconds. */
@@ -175,6 +181,8 @@
 module_param(start_now, int, 0);
 MODULE_PARM_DESC(start_now, "Set to 1 to start the watchdog as"
 		 "soon as the driver is loaded.");
+module_param(nowayout, int, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
 
 /* Default state of the timer. */
 static unsigned char ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
@@ -707,10 +715,10 @@
 {
 	if (iminor(ino)==WATCHDOG_MINOR)
 	{
-#ifndef CONFIG_WATCHDOG_NOWAYOUT	
-		ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
-		ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
-#endif		
+		if (!nowayout) {
+			ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
+			ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
+		}
 	        ipmi_wdog_open = 0;
 	}
 

      reply	other threads:[~2004-07-28 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28  9:41 [PATCH]: convert ipmi_watchdog to also use module option nowayout as it's done in other watchdog drivers Arkadiusz Miskiewicz
2004-07-28 14:16 ` Corey Minyard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4107B520.1060506@mvista.com \
    --to=cminyard@mvista.com \
    --cc=akpm@osdl.org \
    --cc=arekm@pld-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox