mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* watchdog behaviour on close? (watchdog-api.txt)
@ 2007-12-18 17:41 Andrew Dyer
  2008-01-03 21:42 ` Wim Van Sebroeck
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Dyer @ 2007-12-18 17:41 UTC (permalink / raw)
  To: wim; +Cc: linux-kernel

Hi, I am trying to implement a watchdog driver in 2.6.23 for the i.MXL
cpu (based off of drivers/char/watchdog/s3c2410_wdt.c).

I had a question about the api doc for the watchdog
(Documentation/watchdog-api.txt).  Line 37 says "When the device is
closed, the watchdog is disabled."  Later on (Line 56) it says
"Drivers will not disable the watchdog, unless a specific magic
character 'V' has been sent /dev/watchdog just before closing the
file."

I would assume that from reading L37 that the driver would
unconditionally shut down the watchdog when closing (unless
CONFIG_WATCHDOG_NOWAYOUT or the nowayout module param is specified),
but line 56 seems to contradict that.

Can you clarify the intended behaviour?

I am not subscribed to the mailing list, so please cc: replies to me.
-- 
Hardware, n.:
        The parts of a computer system that can be kicked.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: watchdog behaviour on close? (watchdog-api.txt)
  2007-12-18 17:41 watchdog behaviour on close? (watchdog-api.txt) Andrew Dyer
@ 2008-01-03 21:42 ` Wim Van Sebroeck
  0 siblings, 0 replies; 2+ messages in thread
From: Wim Van Sebroeck @ 2008-01-03 21:42 UTC (permalink / raw)
  To: Andrew Dyer; +Cc: linux-kernel

Hi Andrew,

Sorry for the late response.

> Hi, I am trying to implement a watchdog driver in 2.6.23 for the i.MXL
> cpu (based off of drivers/char/watchdog/s3c2410_wdt.c).
> 
> I had a question about the api doc for the watchdog
> (Documentation/watchdog-api.txt).  Line 37 says "When the device is
> closed, the watchdog is disabled."  Later on (Line 56) it says
> "Drivers will not disable the watchdog, unless a specific magic
> character 'V' has been sent /dev/watchdog just before closing the
> file."
> 
> I would assume that from reading L37 that the driver would
> unconditionally shut down the watchdog when closing (unless
> CONFIG_WATCHDOG_NOWAYOUT or the nowayout module param is specified),
> but line 56 seems to contradict that.
> 
> Can you clarify the intended behaviour?

Line 56 describes the Magic Close feature that has been introduced by
(I believe) Jakob Oestergaard. This feature is an extra safety that was
added to make sure that if the watchdog daemon crashes the system is not
left "uncontrolled".

So what should the behaviour be:
1) when the watchdog driver is initialized it should make sure that
the watchdog driver is not running for userspace.
2) when /dev/watchdog is opened the watchdog device should start
3) the watchdog is being kept alive by pinging it
4) when /dev/watchdog is closed and the driver received the magic char "V"
(this is when you support the magic-close feature off-course) then the
watchdog device should stop.
5) if you unload the watchdog driver module then you normally stop
the watchdog device also (unless CONFIG_WATCHDOG_NOWAYOUT or the nowayout
module param is specified).

Hope this makes it clear now,
Greetings,
Wim.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-03 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18 17:41 watchdog behaviour on close? (watchdog-api.txt) Andrew Dyer
2008-01-03 21:42 ` Wim Van Sebroeck

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®