]> git.itanic.dy.fi Git - linux-stable/commit
watchdog: sp5100_tco: Immediately trigger upon starting.
authorGregory Oakes <gregory.oakes@amd.com>
Thu, 16 Mar 2023 20:13:12 +0000 (15:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 12:55:29 +0000 (13:55 +0100)
commitca338fa8032a10e40ed005f84ed6c560dc7a1506
tree054faa97c6e52c47f3e4bdbea5b89bc3f4b695ed
parent6312c7cc07f397e0d11a1b1a7ca713a5711f9489
watchdog: sp5100_tco: Immediately trigger upon starting.

commit 4eda19cc8a29cde3580ed73bf11dc73b4e757697 upstream.

The watchdog countdown is supposed to begin when the device file is
opened. Instead, it would begin countdown upon the first write to or
close of the device file. Now, the ping operation is called within the
start operation which ensures the countdown begins. From experimenation,
it does not appear possible to do this with a single write including
both the start bit and the trigger bit. So, it is done as two distinct
writes.

Signed-off-by: Gregory Oakes <gregory.oakes@amd.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230316201312.17538-1-gregory.oakes@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/watchdog/sp5100_tco.c