]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the watchdog timeout calculation to prevent wrap. The RPi hardware
authorIan Lepore <ian@FreeBSD.org>
Wed, 10 Dec 2014 04:54:43 +0000 (04:54 +0000)
committerIan Lepore <ian@FreeBSD.org>
Wed, 10 Dec 2014 04:54:43 +0000 (04:54 +0000)
commit7f353dddc8cdd7f3e540227191d432f97e56f966
treeadd4a9f0c73d5641f3a825d27e976da234c9edf0
parentcb92abb49c97262fa97b60279493b91c8ee436ff
Fix the watchdog timeout calculation to prevent wrap.  The RPi hardware
can't do a timeout bigger than 15 seconds.  The code wasn't checking for
this and because bitmasking was involved the requested timeout was
basically adjusted modulo-16.  That led to things like a 128 second
timeout actually being a 9 second timeout, which accidentally worked fine
until watchdogd was changed to only pet the dog once every 10 seconds.
sys/arm/broadcom/bcm2835/bcm2835_wdog.c