lkml.org 
[lkml]   [2019]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout
From
Date
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@vger.kernel.org # 5.2 plus anything the above got
>> backported to
>> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>

I'm not seeing this in v5.3-rc6, did it get picked up?

Rasmus

\
 
 \ /
  Last update: 2019-08-26 14:05    [W:0.047 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site