From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rui Santos Subject: Re: [WATCHDOG] iTCO_wdt.c - ICH9 reboot issue - testing wanted Date: Fri, 05 Jun 2009 19:46:14 +0100 Message-ID: <4A2967F6.2000303@grupopie.com> References: <20090430094918.GC4141@infomag.iguana.be> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000906060209040709000403" Return-path: In-Reply-To: <20090430094918.GC4141-flHiHfN8CTwhDM6iD19NGrNAH6kLmebB@public.gmane.org> Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Wim Van Sebroeck Cc: Stephen Clark , Denys Fedoryschenko , Johannes Dewender , "Rafael J. Wysocki" , Frans Pop , Rutger Nijlunsing , Kernel Testers List , Andriy Gapon , Andrew Morton , LKML This is a multi-part message in MIME format. --------------000906060209040709000403 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Wim Van Sebroeck wrote: > Hi All, > Hi Wim, Hi All, > I'm looking for people that can test the below patch(es). > I'm mainly interested in knowing if you experience any side-effects when using this patch. > (See also bugzilla 9868, 10195, 12363 & 12162). > > For people not using the watchdog or without any reboot problems the driver should > work as normal after compilation/installation/... > > For people that have the ICH9 reboot problems: load the module with module-parameter > gbl_smi_en=0 and test the watchdog functionality again. > With your patch, the Intel DG35EC board will not allow my distribution reboot or halt the machine. In order to circumvent that problem, I've made a few addition to your previous patch witch allows the restore of the changed Bit 0 to it's previous value if the module is unloaded. My only doubt is if it should be done every time the gbl_smi_en is zero, or in conjunction with nowayout when the value also equals zero. This patch has what I described and a commented gbl_smi_en only. Can anyone share his/her thoughts on this matter. > Thanks in advance, > Wim. > Regards, Rui --------------000906060209040709000403 Content-Type: text/x-patch; name="linux-2.6.30-rc8-watchdog.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="linux-2.6.30-rc8-watchdog.patch" diff -upr linux-2.6.30-rc8.ori/drivers/watchdog/iTCO_wdt.c linux-2.6.30-rc8.new/drivers/watchdog/iTCO_wdt.c --- linux-2.6.30-rc8.ori/drivers/watchdog/iTCO_wdt.c 2009-06-05 19:26:07.000000000 +0100 +++ linux-2.6.30-rc8.new/drivers/watchdog/iTCO_wdt.c 2009-06-05 19:33:03.000000000 +0100 @@ -63,7 +63,7 @@ /* Module and version information */ #define DRV_NAME "iTCO_wdt" -#define DRV_VERSION "1.05" +#define DRV_VERSION "1.06" #define PFX DRV_NAME ": " /* Includes */ @@ -277,6 +277,13 @@ MODULE_PARM_DESC(heartbeat, "Watchdog he "(2 0 = Disables TCO logic generating an SMI# */ val32 = inl(SMI_EN); + /* Bit 13: TCO_EN -> 0 = Disables TCO logic generating an SMI# + Bit 0: GBL_SMI_EN -> 0 = No SMI# will be generated by ICH9. */ val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ + if (gbl_smi_en == 0) + val32 &= 0xfffffffe; /* Turn off GBL_SMI_EN */ outl(val32, SMI_EN); /* The TCO I/O registers reside in a 32-byte range pointed to @@ -733,8 +760,8 @@ static int __devinit iTCO_wdt_init(struc goto unreg_region; } - printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n", - heartbeat, nowayout); + printk(KERN_INFO PFX "initialized. heartbeat=%d sec, gbl_smi_en=%d " + "(nowayout=%d)\n", heartbeat, gbl_smi_en, nowayout); return 0; @@ -847,6 +874,9 @@ unreg_platform_driver: static void __exit iTCO_wdt_cleanup_module(void) { + //if (gbl_smi_en == 0) + if (gbl_smi_en == 0 && nowayout == 0) + iTCO_wdt_restore_gbl_smi_en(); platform_device_unregister(iTCO_wdt_platform_device); platform_driver_unregister(&iTCO_wdt_driver); printk(KERN_INFO PFX "Watchdog Module Unloaded.\n"); --------------000906060209040709000403--