Hi Wim
static int watchdog_stop(struct watchdog_device *wddev)
{
- int err;
+ int err = -1;
+
+ if (test_bit(WDOG_NO_WAY_OUT,&wdd->status))
+ return err;
If you return err at this point you never clean the bit WDOG_ACTIVE then
the timer will keep resetting the wdt because the bit is still active.
If WDOG_ACTIVE is never cleared, then you will need to keep pinging the watchdog
to not start the reboot. Even when you use the timer (with this code):
if (time_before(jiffies, next_heartbeat) ||
(!test_bit(WDOG_ACTIVE,&wdt_dev.status))) {
if WDOG_ACTIVE is set then you fall down to: if (time_before(jiffies, next_heartbeat))
which means that as long that the next_heartbeat time is not there we will keep pinging
the watchdog device, but as soon as jiffies> next_heartbeat, the watchdog device will
not be triggered anymore.
But I see another possible problem here. Will do some special tests first.
Sorry, I didn't see the ! operator before test_bit, my mistake !! ;)
best regards
Alejandro
PS: I send a patch some days ago (xilinx watchdog....)...and anyone
comment it :(. Should I send it again to the list ?
Participe en Universidad 2012, del 13 al 17 de febrero de 2012.
Habana, Cuba: http://www.congresouniversidad.cu
Consulte la enciclopedia colaborativa cubana. http://www.ecured.cu
Participe en el Segundo Congreso Medio Ambiente Construido y
Desarrollo Sustentable (MACDES 2011) del 6 al 9 de diciembre de 2011,
Hotel Nacional, Habana, Cuba: http://macdes.cujae.edu.cu
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html