Skip to content
Commit aff3994d authored by Mika Westerberg's avatar Mika Westerberg Committed by Greg Kroah-Hartman
Browse files

watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running

commit ef9b7bf5 upstream.

Daniel reported that the commit 1ae3e78c ("watchdog: iTCO_wdt: No
need to stop the timer in probe") makes QEMU implementation of the iTCO
watchdog not to trigger reboot anymore when NO_REBOOT flag is initially
cleared using this option (in QEMU command line):

  -global ICH9-LPC.noreboot=false

The problem with the commit is that it left the unconditional setting of
NO_REBOOT that is not cleared anymore when the kernel keeps pinging the
watchdog (as opposed to the previous code that called iTCO_wdt_stop()
that cleared it).

Fix this so that we only set NO_REBOOT if the watchdog was not initially
running.

Fixes: 1ae3e78c

 ("watchdog: iTCO_wdt: No need to stop the timer in probe")
Reported-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221028062750.45451-1-mika.westerberg@linux.intel.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 83a30e94
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment