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 v3 2/2] watchdog: fix w83627hf_wdt clear timeout expired
Date: Tue, 2 Apr 2013 21:21:42 -0700 [thread overview]
Message-ID: <20130403042142.GA3640@roeck-us.net> (raw)
In-Reply-To: <CAHyaeP1ExzMr8_KvSrmf6+urVROEHRePs_KA3CZ3bnU6Ov79LQ@mail.gmail.com>
On Mon, Apr 01, 2013 at 09:59:00PM -0700, Tony Chung wrote:
> Thanks Guenter!
> I agree with you. My first reaction was also about a small watchdog
> server that will start in early boot process. There are pros and
> cons. For example, there are many types of watchdog devices such as
> ipmi_watchdog which can accept more than 255 seconds for timeout. So
> you really need udev to pick the correct watchdog driver. It could be
> very complex.
>
> Our requirement don't need watchdog protection during the boot process
> until application is fully up but a driver should not assume anything.
Ok, but then the BIOS should not enable the watchdog.
> Anyway, an unexpected reboot is definitely a bug that need to be
> fixed. It is really easily reproducible. Depending on your hardware
Agreed.
> and BIOS settings, just reboot the boot, wait for 5 minutes and then
> run "insmod w83627hf_wdt.ko". The box just reboot by itself. The
> watchdog sever is not even started.
>
Doesn't happen for me, as the watchdog is initially not enabled in my system,
and bit 4 is never set. And when it gets set, the system immediately reboots.
> This line is actually the original fix that is running over a year:
> outb_p(0, WDT_EFDR); /* disable to prevent reboot */
>
Unfortunately this turns off the watchdog if it was running and has triggered.
> When I tried to cleanup it up, I thought I don't need it but it
> turned out it was still needed.
> When I changed it from 0xC0 to 0xD0, it still reboot.
>
So it looks like the watchdog triggered, for some reason did not cause
a reset, but resetting the trigger flag does.
Ultimately, the new code turns the watchdog off if it was running, has already
triggered, but did not cause a reset. The ultimate effect is that the system
will hang if it gets stuck before the watchdog application is started later on.
Maybe that is not your application, but others wil defintely want that
protection.
So I don't think the solution is correct. We should find out why the watchdog
trigger did not cause a reset. Also, I think it would be better in this
situation (if watchdog has triggered) to restart it with the default timeout.
What is the exact chip type in your system ? I want to have a look into the
datasheet; maybe I can find out how it can trigger without causing a reset.
Thanks,
Guenter
next prev parent reply other threads:[~2013-04-03 4:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 5:59 [PATCH v3 1/2] watchdog: improve w83627hf_wdt to timeout in minute Tony Chung
2013-04-01 5:59 ` [PATCH v3 2/2] watchdog: fix w83627hf_wdt clear timeout expired Tony Chung
2013-04-02 0:07 ` Guenter Roeck
2013-04-02 4:59 ` Tony Chung
2013-04-03 4:21 ` Guenter Roeck [this message]
2013-04-03 15:06 ` Tony Chung
2013-04-03 15:50 ` Guenter Roeck
2013-04-03 16:07 ` Guenter Roeck
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=20130403042142.GA3640@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