mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wim Van Sebroeck <wim@iguana.be>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: w83627hf_wdt: Add early_disable module parameter
Date: Mon, 26 May 2014 23:26:06 +0200	[thread overview]
Message-ID: <20140526212606.GA23827@spo001.leaseweb.com> (raw)
In-Reply-To: <1396722457-8275-1-git-send-email-linux@roeck-us.net>

Hi Guenter,

> Add early_disable module parameter to match functionality previously
> available in the w83697hf_wdt driver.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/watchdog/w83627hf_wdt.c |   15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index b1da0c1..7165704 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -64,6 +64,10 @@ MODULE_PARM_DESC(nowayout,
>  		"Watchdog cannot be stopped once started (default="
>  				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
>  
> +static int early_disable;
> +module_param(early_disable, int, 0);
> +MODULE_PARM_DESC(early_disable, "Disable watchdog at boot time (default=0)");
> +
>  /*
>   *	Kernel methods.
>   */
> @@ -208,9 +212,14 @@ static int w83627hf_init(struct watchdog_device *wdog, enum chips chip)
>  
>  	t = superio_inb(cr_wdt_timeout);
>  	if (t != 0) {
> -		pr_info("Watchdog already running. Resetting timeout to %d sec\n",
> -			wdog->timeout);
> -		superio_outb(cr_wdt_timeout, wdog->timeout);
> +		if (early_disable) {
> +			pr_warn("Stopping previously enabled watchdog until userland kicks in\n");
> +			superio_outb(cr_wdt_timeout, 0);
> +		} else {
> +			pr_info("Watchdog already running. Resetting timeout to %d sec\n",
> +				wdog->timeout);
> +			superio_outb(cr_wdt_timeout, wdog->timeout);
> +		}
>  	}
>  
>  	/* set second mode & disable keyboard turning off watchdog */

Has been added to linux-watchdog-next.

Kind regards,
Wim.


      parent reply	other threads:[~2014-05-26 21:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-05 18:27 Guenter Roeck
2014-04-05 18:27 ` [PATCH v3 2/2] watchdog: Remove drivers for W83697HF and W83697UG Guenter Roeck
2014-05-26 21:26   ` Wim Van Sebroeck
2014-05-26 23:48     ` Guenter Roeck
2014-05-26 21:26 ` Wim Van Sebroeck [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=20140526212606.GA23827@spo001.leaseweb.com \
    --to=wim@iguana.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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

all inboxes | Powered by JetHome®