]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system freeze...
authorfreddy.hsin <freddy.hsin@mediatek.com>
Wed, 30 Dec 2020 08:15:57 +0000 (16:15 +0800)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 7 Feb 2021 13:41:22 +0000 (14:41 +0100)
commitffd58041e06a90eee9f9136a0ac901fbc8dbad01
tree61ef882e0f904fee7fdc8db1afd768deaac116d0
parent23810512d5cca28067de0468b092a3a1a12d84e7
watchdog: mtk_wdt: Remove mtk_wdt_stop() in probe() to prevent the system freeze and it doesn't reboot by watchdog problem

Before user space daemon start to access the watchdog device,
there is a time interval that watchdog is disabled in the
original flow. If the system freezing at this interval, it
cannot be rebooted by watchdog hardware automatically.

In order to solve this problem, the watchdog hardware should be
kept working, and start hrtimer in framework to ping it by
setting max_hw_heartbeat_ms and HW_RUNNING used in
watchdog_need_worker to determine whether the worker should be
started or not. Besides the redundant setting of max_timeout is
also removed.

Signed-off-by: freddy.hsin <freddy.hsin@mediatek.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1609316157-3748-1-git-send-email-freddy.hsin@mediatek.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/mtk_wdt.c