]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 12 Aug 2025 12:51:26 +0000 (14:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:34 +0000 (11:56 +0200)
commit5dbee425acc1e122493e86f59d42c353875a078f
tree6561ec17ed206443de3a7c08c8cba5ec98dc838e
parent78b39e6ec0c75bd1293eac5375837e43e2d86ab7
watchdog: mpc8xxx_wdt: Reload the watchdog timer when enabling the watchdog

[ Upstream commit 7dfd80f70ef00d871df5af7c391133f7ba61ad9b ]

When the watchdog gets enabled with this driver, it leaves enough time
for the core watchdog subsystem to start pinging it. But when the
watchdog is already started by hardware or by the boot loader, little
time remains before it fires and it happens that the core watchdog
subsystem doesn't have time to start pinging it.

Until commit 19ce9490aa84 ("watchdog: mpc8xxx: use the core worker
function") pinging was managed by the driver itself and the watchdog
was immediately pinged by setting the timer expiry to 0.

So restore similar behaviour by pinging it when enabling it so that
if it was already enabled the watchdog timer counter is reloaded.

Fixes: 19ce9490aa84 ("watchdog: mpc8xxx: use the core worker function")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/mpc8xxx_wdt.c