watchdog card may be initially disabled

Denys Vlasenko vda.linux at googlemail.com
Mon Apr 20 09:26:15 UTC 2009


On Sunday 19 April 2009 19:22, 八戒哥哥 wrote:
> The watchdog card may be initially disabled by BIOS.
> 
> Executing 'watchdog -T 3 -t 1 /dev/watchdog' and
> 
> 'kill -9 `pidof watchdog`' will not work, the machine will still run happyly.
> 
> you must exeute these commands twice to make watchdog take effect.
> 
> I cannot find a 'WDIOS_ENABLECARD' ioctl in busybox-1.13.3/miscutils/watchdog.c.
> 
> The only ioctl operation is 'WDIOC_SETTIMEOUT'.
> 
>  59         htimer_duration = htimer_duration / 1000;
>  60         ioctl_or_warn(3, WDIOC_SETTIMEOUT, &htimer_duration);
> 
> I suggest to add a 'WDIOC_SETOPTIONS' ioctl before 'WDIOC_SETTIMEOUT',
> 
> then, we can be sure the watchdog card is enabled.
> 
> +58         ioctl_or_warn(3, WDIOC_SETOPTIONS, WDIOS_ENABLECARD);
> 
>   59         htimer_duration = htimer_duration / 1000;
>   60         ioctl_or_warn(3, WDIOC_SETTIMEOUT, &htimer_duration);


Please test this patch.
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3.patch
Type: text/x-diff
Size: 1038 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090420/61767a82/attachment.bin>


More information about the busybox mailing list