From owner-freebsd-arm@freebsd.org Sat Jan 14 22:54:31 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FED8CB0CD8 for ; Sat, 14 Jan 2017 22:54:31 +0000 (UTC) (envelope-from samm@os2.kiev.ua) Received: from s1.sdv.com.ua (s1.sdv.com.ua [IPv6:2a01:d0:81f8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEABD19F3 for ; Sat, 14 Jan 2017 22:54:30 +0000 (UTC) (envelope-from samm@os2.kiev.ua) Received: from [2001:1a48:6:11:7c9a:c605:5e0:aa34] by s1.sdv.com.ua with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1cSXDO-000M1e-Gx for freebsd-arm@freebsd.org; Sun, 15 Jan 2017 00:54:27 +0200 From: "Samorukov,Alexey" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Watchdog on RPi and watchdogd Message-Id: Date: Sat, 14 Jan 2017 23:54:20 +0100 To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3259) X-SA-Score: -2.9 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jan 2017 22:54:31 -0000 Hi,=20 I tried to use watchdogd on RPi 1. Initially i got "patting the dog: = Operation not supported=E2=80=9D and "Can't arm, timeout must be between = 1-15 seconds=E2=80=9D. Digging into the source i found that it is = hardware limitation and i been able to run the watchdog correctly using = "watchdogd -d -s 1 -t 8=E2=80=9D. However it gives me only 8 seconds = (2^33) and i would like to have 15. But if i am trying to set 15, = watchdogd using 2^34 (17 seconds) and fail because its > 15, which is hw = limit. So in fact using current interface i can use maximum 8 seconds instead = of possible 15. I think it should be viable solution to limit value to = 15 seconds (with warning in the logs) in the bcmwd driver if request is = > 15 seconds instead of warning. This should give ability to utilize = maximum timeout with the old API. I can send a PR if there are no = objections against this.