watchdog(9) bug in geode cs5536 watchdog

From: Patrick Lamaizière <patfbsd_at_davenulle.org>
Date: Fri, 10 Oct 2008 15:31:20 +0200
Hello,

On a soekris Net5501, if you do a watchdog -t 16, followed by a watchdog
-t 0 to disable the watchdog, and then after some time (16s) re-enable
the watchdog the box reboots immediatly. This prevents also to stop and
restart watchdogd(8).

This is because when you stop the watchdog, the timer is not stoped,
only the hard reset is disabled. So when the timer has elapsed, the C2
event of the timer is set. 

But when the hard reset is re-enabled, the event is not cleared and the
box reboots.


The attached patch stops and resets the counter when the watchdog is
disabled and do not disable the hard reset of the timer (if the timer
has elapsed it's too late).

(also on http://user.lamaiziere.net/patrick/geode.c-patch.txt)

Regards.
Received on Fri Oct 10 2008 - 11:51:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:36 UTC