Date: Wed, 10 Dec 2014 06:29:32 +0100 (CET) From: Andreas Schwarz <freebsd.asc@strcmp.org> To: Ian Lepore <ian@FreeBSD.org> Cc: freebsd-arm@FreeBSD.org Subject: Re: RPi - watchdogd not working anymore (since r273154+) Message-ID: <457ba92c65e.30c60c9a@mail.schwarzes.net> In-Reply-To: <1418185467.1064.166.camel@revolution.hippie.lan> References: <457b82448a7.53997a24@mail.schwarzes.net> <1418185467.1064.166.camel@revolution.hippie.lan>
index | next in thread | previous in thread | raw e-mail
On 09.12.14, Ian Lepore wrote: Hi Ian, > watchdogd requests a timeout of approximately 128 seconds. It used to > pet the dog once per second, and recently it was changed to only do so > once every 10 seconds for efficiency. > > The rpi watchdog hardware is unable to set a timeout longer than 15 > seconds, but a bug in the driver let the value wrap around then get > bitmasked such that the request for a 128 second timeout was actually > getting handled as a 9 second timeout. The 9 second thing worked when > we were petting the dog once a second, but now fails at once every 10 > seconds. > > I've got a fix for the wrapping problem, but all it will do is make the > timer not get set at all if you ask for 128 seconds (that's what the > interface for watchdogs requires, don't set the timer if can't be at > least as long as requested). > > To fix your problem you'll need to set watchdogd_flags="-s 4 -t 8" in > your rc.conf. That will make the timeout 8 seconds and pet the dog > every 4 seconds. You don't have too many options for the timeout value > (-t) because of the goofy way the timeout is represented in the kernel. > The only choices that work on rpi are 1,2,4,8 seconds. If you ask for 9 > it gets represented as a value that translates to 17.5 seconds and rpi > can't do it. Thank you for your copious explanation. I understand the problem and was able to run the watchdog again. In general, it's a litte bit unsatisfying, that we have a (limited) watchdog hardware which will not fit the requirements of the freebsd watchdog implementation (which normally should cover all the watchdog hardware). best regards, Andreashome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?457ba92c65e.30c60c9a>
