Commit deb9197b authored by Wim Van Sebroeck's avatar Wim Van Sebroeck

watchdog: iTCO_wdt.c - problems with newer hardware due to SMI clearing

Redhat Bugzilla: Bug 727875 - TCO_EN bit is disabled by TCO driver
Jiri Slaby: 28d41f53 broke temperature sensors on a ICH10 chipset

The iTCO_wdt driver disables the SMI. This breaks good working of newer hardware.
The disabling of the SMI by the TCO logic dates back from the i810-tco driver
from Nils Faerber (around 28 July 2000). The reason for this was that some BIOSes
install handlers reset or disable the watchdog timer instead of resetting the system.
The trick to fix this was to disable the SMI (by clearing the SMI_TCO_EN bit of the
SMI_EN register) to prevent this from happening.

This however has strange effects on newer hardware. So we are in a situation that
a fix for broken old hardware affects newer hardware.

The correct solution is to make this fix an option (with the new module parameter:
turn_SMI_watchdog_clear_off) so that the default behaviour is the unfixed version.

the next patch will be to move this in the start and stop functions of the driver
and to add a new module parameter for the global_smi_en bit and to get rid of the
vendor_support code.

This fix can have an effect on old (typical ICH & ICH2 chipsets) motherboards that
have a broken BIOS implementation concerning TCO logic. In these case the module
parameter turn_SMI_watchdog_clear_off=1 will need to be added.
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent c63b6d02
/* /*
* intel TCO Watchdog Driver * intel TCO Watchdog Driver
* *
* (c) Copyright 2006-2010 Wim Van Sebroeck <wim@iguana.be>. * (c) Copyright 2006-2011 Wim Van Sebroeck <wim@iguana.be>.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
/* Module and version information */ /* Module and version information */
#define DRV_NAME "iTCO_wdt" #define DRV_NAME "iTCO_wdt"
#define DRV_VERSION "1.06" #define DRV_VERSION "1.07"
#define PFX DRV_NAME ": " #define PFX DRV_NAME ": "
/* Includes */ /* Includes */
...@@ -384,6 +384,11 @@ MODULE_PARM_DESC(nowayout, ...@@ -384,6 +384,11 @@ MODULE_PARM_DESC(nowayout,
"Watchdog cannot be stopped once started (default=" "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static int turn_SMI_watchdog_clear_off = 0;
module_param(turn_SMI_watchdog_clear_off, int, 0);
MODULE_PARM_DESC(turn_SMI_watchdog_clear_off,
"Turn off SMI clearing watchdog (default=0)");
/* /*
* Some TCO specific functions * Some TCO specific functions
*/ */
...@@ -808,10 +813,12 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, ...@@ -808,10 +813,12 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev,
ret = -EIO; ret = -EIO;
goto out_unmap; goto out_unmap;
} }
if (turn_SMI_watchdog_clear_off) {
/* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */ /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# */
val32 = inl(SMI_EN); val32 = inl(SMI_EN);
val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */
outl(val32, SMI_EN); outl(val32, SMI_EN);
}
/* The TCO I/O registers reside in a 32-byte range pointed to /* The TCO I/O registers reside in a 32-byte range pointed to
by the TCOBASE value */ by the TCOBASE value */
......
Markdown is supported
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