]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
watchdog: sbsa: Adjust keepalive timeout to avoid MediaTek WS0 race condition
authorAaron Plattner <aplattner@nvidia.com>
Mon, 21 Jul 2025 23:06:39 +0000 (16:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:59 +0000 (16:25 +0200)
commit94fc54b397a7bad2c4a200ab32a9c8b08bdae179
tree53e3a7f221dd2b3e2100738144ccf74092657a1f
parent2f5edde7d7ff3af3ed5eeca26dca27fa013fecaa
watchdog: sbsa: Adjust keepalive timeout to avoid MediaTek WS0 race condition

[ Upstream commit 48defdf6b083f74a44e1f742db284960d3444aec ]

The MediaTek implementation of the sbsa_gwdt watchdog has a race
condition where a write to SBSA_GWDT_WRR is ignored if it occurs while
the hardware is processing a timeout refresh that asserts WS0.

Detect this based on the hardware implementer and adjust
wdd->min_hw_heartbeat_ms to avoid the race by forcing the keepalive ping
to be one second later.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250721230640.2244915-1-aplattner@nvidia.com
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/sbsa_gwdt.c