[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8a7a29d4-92ed-1256-6c91-c2e528e58e3b@rasmusvillemoes.dk>
Date: Mon, 26 Aug 2019 14:05:12 +0200
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Guenter Roeck <linux@...ck-us.net>,
Wim Van Sebroeck <wim@...ux-watchdog.org>
Cc: Georg Hofmann <georg@...mannsweb.com>,
linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] watchdog: imx2_wdt: fix min() calculation in
imx2_wdt_set_timeout
On 12/08/2019 15.28, Guenter Roeck wrote:
> On 8/12/19 6:13 AM, Rasmus Villemoes wrote:
>> Converting from ms to s requires dividing by 1000, not multiplying. So
>> this is currently taking the smaller of new_timeout and 1.28e8,
>> i.e. effectively new_timeout.
>>
>> The driver knows what it set max_hw_heartbeat_ms to, so use that
>> value instead of doing a division at run-time.
>>
>> FWIW, this can easily be tested by booting into a busybox shell and
>> doing "watchdog -t 5 -T 130 /dev/watchdog" - without this patch, the
>> watchdog fires after 130&127 == 2 seconds.
>>
>> Fixes: b07e228eee69 "watchdog: imx2_wdt: Fix set_timeout for big
>> timeout values"
>> Cc: stable@...r.kernel.org # 5.2 plus anything the above got
>> backported to
>> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
>
> Reviewed-by: Guenter Roeck <linux@...ck-us.net>
I'm not seeing this in v5.3-rc6, did it get picked up?
Rasmus
Powered by blists - more mailing lists