public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Wed, 3 Apr 2013 09:07:24 -0700	[thread overview]
Message-ID: <20130403160724.GA31714@roeck-us.net> (raw)
In-Reply-To: <20130403155026.GA4549@roeck-us.net>

On Wed, Apr 03, 2013 at 08:50:26AM -0700, Guenter Roeck wrote:
> On Wed, Apr 03, 2013 at 08:06:59AM -0700, Tony Chung wrote:
> > On Tue, Apr 2, 2013 at 9:21 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> > 
> > >
> > >
> > > 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.
> > 
> > Winbond 83627HF chip
> > 

Followup: what chip revision ?

Revision G or later have a new configuration bit, bit 3 of CR E7 on logical
device A.

SELWDTORST. Watch Dog Timer Reset Control.
= 0 is reset by LPC_RST.
= 1 is reset by PWR_OK.

I could imagine that the WDT logic is never correctly initialized in your
system, which might explain the behavior. If so, your code is indeed
correct (or the best I could come up with too), as we would have to ensure
that the wdt subsystem is initialized correctly by writing into all its registers.

Given that, I would suggest to re-submit the patch with a different explanation
(we don't know if the wdt really started running, all we know is that the
expired bit is set), and I'll give it an Acked-by. Something along the line of 

"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".

Thanks,
Guenter

> > I believe BIOS has watchdog disabled otherwise it would have reboot the box.
> > However, the timer just start counting.
> > 
> > Comparing to ipmi_watchdog, you can do this:
> > modprobe ipmi_watchdog ... start_now=0 ...action=<>  nowayout=1
> > 
> > So it is possible to load the driver without start counting.
> > 
> That is a different driver, though. you don't have the start_now option here.
> 
> > Notice it is an else, so t is actually 0 already (i.e. expired or
> > never start running):
> 
> Still no idea why that would cause the system to reboot when you reset
> the trigger without setting t to 0 again (or why the system doesn't reset
> in the first place if the watchdog already triggered).
> 
> I am not really sure what the best approach is here, so let's leave it
> up to the maintainer to decide which way to go.
> 
> Thanks,
> Guenter
> --
> 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
> 

      reply	other threads:[~2013-04-03 16:07 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
2013-04-03 15:06         ` Tony Chung
2013-04-03 15:50           ` Guenter Roeck
2013-04-03 16:07             ` 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=20130403160724.GA31714@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