]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: armada_37xx_wdt: Fix .set_timeout callback
authorPali Rohár <pali@kernel.org>
Tue, 26 Jul 2022 08:56:12 +0000 (10:56 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 2 Oct 2022 10:55:40 +0000 (12:55 +0200)
commit0d4af9c63035cec4f4f9c636c95e8fe7b88317e9
tree954de8af35067d93b35012ab1cf20231c6c9d5f2
parent559db62e8dbe1759a98d48cd517b46441575bc29
watchdog: armada_37xx_wdt: Fix .set_timeout callback

ioctl(WDIOC_SETTIMEOUT) calls .set_timeout and .ping callbacks and it is
expected that it changes current watchdog timeout.

armada_37xx_wdt's .ping callback just reping counter 0 and does not touch
counter 1 used for timeout. So it is needed to set counter 1 to the new
value in .set_timeout callback to ensure ioctl(WDIOC_SETTIMEOUT)
functionality. Fix it.

Fixes: 63a453f0cb72 ("watchdog: Add support for Armada 37xx CPU watchdog")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20220726085612.10672-1-pali@kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/armada_37xx_wdt.c