linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case
@ 2021-07-26 11:46 Jan Kiszka
  2021-07-26 12:01 ` Andy Shevchenko
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Jan Kiszka @ 2021-07-26 11:46 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: linux-watchdog, Linux Kernel Mailing List, Paolo Bonzini,
	Christian Storm, Andy Shevchenko, Mantas Mikulėnas

From: Jan Kiszka <jan.kiszka@siemens.com>

Obviously, the test needs to run against the register content, not its
address.

Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout")
Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 drivers/watchdog/iTCO_wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index b3f604669e2c..643c6c2d0b72 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
 	 * Otherwise, the BIOS generally reboots when the SMI triggers.
 	 */
 	if (p->smi_res &&
-	    (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
+	    (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
 		tmrval /= 2;
 
 	/* from the specs: */
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-09-07 20:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 11:46 [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case Jan Kiszka
2021-07-26 12:01 ` Andy Shevchenko
2021-07-26 12:04   ` Jan Kiszka
2021-07-26 13:40     ` Andy Shevchenko
2021-07-26 13:59       ` Guenter Roeck
2021-07-26 14:05         ` Jan Kiszka
2021-07-26 14:51           ` Andy Shevchenko
2021-07-26 17:10             ` Jan Kiszka
2021-07-26 21:45               ` Andy Shevchenko
2021-07-26 12:03 ` Paolo Bonzini
2021-07-26 12:05   ` Jan Kiszka
2021-07-26 13:51     ` Guenter Roeck
2021-07-26 13:44 ` Guenter Roeck
2021-07-26 16:59 ` Mantas Mikulėnas
2021-08-20 13:45 ` Jan Kiszka
2021-08-30 19:47   ` Jan Kiszka
2021-08-30 20:00     ` Guenter Roeck
2021-09-07 20:14       ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).