From: Guenter Roeck <linux@roeck-us.net>
To: Tony Chung <tonychung00@gmail.com>
Cc: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] watchdog: fix w83627hf_wdt clear timeout expired
Date: Wed, 3 Apr 2013 22:29:45 -0700 [thread overview]
Message-ID: <20130404052945.GA21371@roeck-us.net> (raw)
In-Reply-To: <1365050384-9130-2-git-send-email-tonychung00@gmail.com>
On Wed, Apr 03, 2013 at 09:39:44PM -0700, Tony Chung wrote:
>
> Observed that the Watchdog Timer Status bit can be set when the driver is
> loaded. Reset it during initialization. The time-out value must be set to 0
> explicitly in this case to prevent an immediate reset.
>
> Depending on the motherboard and with watchdog disabled in the BIOS, this reset problem can easily be reproduced by the following steps:
> 1. reboot the system
> 2. wait for 5+ minutes
> 3. don't start any watchdog server.
> 4. just run "modprobe w83627hf_wdt"
>
> If the system load the driver after 5 minutes, it rebooted immediately because of timer expired. For example, fsck could take more than 5 minutes to run,
> then the computer reboot as soon as the driver was loaded.
>
[ the above aplies to your system, so I would not add that to the commit log,
but that it up to Wim to decide ]
> Signed-off-by: Tony Chung <tonychung00@gmail.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/w83627hf_wdt.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c
> index 8f1111d..7eaa226 100644
> --- a/drivers/watchdog/w83627hf_wdt.c
> +++ b/drivers/watchdog/w83627hf_wdt.c
> @@ -168,14 +168,16 @@ static void w83627hf_init(void)
> pr_info("Watchdog already running. Resetting timeout to %d sec\n",
> wdt_get_timeout_secs(timeout));
> outb_p(timeout, WDT_EFDR); /* Write back to CRF6 */
> + } else {
> + outb_p(0, WDT_EFDR); /* disable to prevent reboot */
> }
>
> w83627hf_setup_crf5();
>
> outb_p(0xF7, WDT_EFER); /* Select CRF7 */
> t = inb_p(WDT_EFDR); /* read CRF7 */
> - t &= ~0xC0; /* disable keyboard & mouse turning off
> - watchdog */
> + t &= ~0xD0; /* clear timeout occurred and disable keyboard
> + & mouse turning off watchdog */
> outb_p(t, WDT_EFDR); /* Write back to CRF7 */
>
> w83627hf_unselect_wd_register();
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2013-04-04 5:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 4:39 [PATCH v3 1/2] watchdog: improve w83627hf_wdt to timeout in minute Tony Chung
2013-04-04 4:39 ` [PATCH v4 2/2] watchdog: fix w83627hf_wdt clear timeout expired Tony Chung
2013-04-04 5:29 ` Guenter Roeck [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=20130404052945.GA21371@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=tonychung00@gmail.com \
--cc=wim@iguana.be \
/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