lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1285855684-8369-2-git-send-email-timo.lindfors@iki.fi>
Date:	Thu, 30 Sep 2010 17:08:04 +0300
From:	Timo Juhani Lindfors <timo.lindfors@....fi>
To:	linux-watchdog@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org,
	Timo Juhani Lindfors <timo.lindfors@....fi>
Subject: [PATCH 2/2] watchdog: it8712f_wdt: Add module parameter for alternative reset sources

On iEi PCISA-9652-R10 (BIOS version 1.5) single board computer reads
from the game port do not seem to reset the watchdog timer. This patch
adds a module parameter wdt_config_reg to specify alternative reset
sources. At least WDT_RESET_KBD has been tested, even just running

while true; do
    setleds -L +scroll
    sleep 1
    setleds -L -scroll
    sleep 1
done

is enough to keep the watchdog happy.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@....fi>
---
 drivers/watchdog/it8712f_wdt.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c
index b08fae6..b32c6c0 100644
--- a/drivers/watchdog/it8712f_wdt.c
+++ b/drivers/watchdog/it8712f_wdt.c
@@ -85,6 +85,14 @@ static unsigned short address;
 #define WDT_OUT_PWROK	0x10	/* Pulse PWROK on timeout */
 #define WDT_OUT_KRST	0x40	/* Pulse reset on timeout */
 
+static int wdt_control_reg = WDT_RESET_GAME;
+module_param(wdt_control_reg, int, 0);
+MODULE_PARM_DESC(wdt_control_reg, "Value to write to watchdog control "
+		"register. The default WDT_RESET_GAME resets the timer on "
+		"game port reads that this driver generates. You can also "
+		"use KBD, MOUSE or CIR if you have some external way to "
+		"generate those interrupts.");
+
 static int superio_inb(int reg)
 {
 	outb(reg, REG);
@@ -131,7 +139,8 @@ static inline void superio_exit(void)
 
 static inline void it8712f_wdt_ping(void)
 {
-	inb(address);
+	if (wdt_control_reg & WDT_RESET_GAME)
+		inb(address);
 }
 
 static void it8712f_wdt_update_margin(void)
@@ -170,7 +179,7 @@ static void it8712f_wdt_enable(void)
 	superio_enter();
 	superio_select(LDN_GPIO);
 
-	superio_outb(WDT_RESET_GAME, WDT_CONTROL);
+	superio_outb(wdt_control_reg, WDT_CONTROL);
 
 	it8712f_wdt_update_margin();
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ