From: Rui Santos <rsantos-TSnNRl9vlf1Wk0Htik3J/w@public.gmane.org>
To: Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>
Cc: Stephen Clark <sclark46-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org>,
Denys Fedoryschenko
<denys-EpTYZhqHKuJnTudFRACr3A@public.gmane.org>,
Johannes Dewender <arch-ArHZ4xy2k9XR7s880joybQ@public.gmane.org>,
"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
Frans Pop <elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>,
Rutger Nijlunsing
<bugzilla.kernel-iCbNM5W9OABowPkYzbXIcw@public.gmane.org>,
Kernel Testers List
<kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Andriy Gapon <avg-+43SdJ71VxTsG83rWm+8vg@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [WATCHDOG] iTCO_wdt.c - ICH9 reboot issue - testing wanted
Date: Fri, 05 Jun 2009 19:46:14 +0100 [thread overview]
Message-ID: <4A2967F6.2000303@grupopie.com> (raw)
In-Reply-To: <20090430094918.GC4141-flHiHfN8CTwhDM6iD19NGrNAH6kLmebB@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1132 bytes --]
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
[-- Attachment #2: linux-2.6.30-rc8-watchdog.patch --]
[-- Type: text/x-patch, Size: 2784 bytes --]
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<heartbeat<39 (TCO v1) or 613 (TCO v2), default="
__MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
+#define GBL_SMI_EN_DEFAULT 1 /* 1 = don't turn GBL_SMI_EN off */
+static int gbl_smi_en = GBL_SMI_EN_DEFAULT;
+module_param(gbl_smi_en, int, 0);
+MODULE_PARM_DESC(gbl_smi_en,
+ "Turn GBL_SMI_EN off to fix reboot issues on ICH9..., default="
+ __MODULE_STRING(GBL_SMI_EN_DEFAULT) ")");
+
static int nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout,
@@ -412,6 +419,23 @@ static int iTCO_wdt_keepalive(void)
return 0;
}
+static int iTCO_wdt_restore_gbl_smi_en(void)
+{
+ unsigned long val32;
+
+ /* Remove the TCO_EN bit in SMI_EN register */
+ if (!request_region(SMI_EN, 4, "iTCO_wdt"))
+ printk(KERN_ERR PFX "Restore of gbl_smi_en was not successful\n");
+ else {
+ val32 = inl(SMI_EN);
+ val32 |= 0x00000001;
+ outl(val32, SMI_EN);
+ release_region(SMI_EN, 4);
+ }
+
+ return 0;
+}
+
static int iTCO_wdt_set_heartbeat(int t)
{
unsigned int val16;
@@ -688,9 +712,12 @@ static int __devinit iTCO_wdt_init(struc
ret = -EIO;
goto out;
}
- /* Bit 13: TCO_EN -> 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");
next prev parent reply other threads:[~2009-06-05 18:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 9:49 [WATCHDOG] iTCO_wdt.c - ICH9 reboot issue - testing wanted Wim Van Sebroeck
[not found] ` <20090430094918.GC4141-flHiHfN8CTwhDM6iD19NGrNAH6kLmebB@public.gmane.org>
2009-04-30 10:33 ` Andriy Gapon
[not found] ` <49F97E81.8020201-+43SdJ71VxTsG83rWm+8vg@public.gmane.org>
2009-05-01 18:32 ` Wim Van Sebroeck
2009-06-02 16:09 ` Rui Santos
[not found] ` <4A254EBF.70004-TSnNRl9vlf1Wk0Htik3J/w@public.gmane.org>
2009-06-03 21:04 ` Wim Van Sebroeck
2009-06-05 18:46 ` Rui Santos [this message]
[not found] ` <4A2967F6.2000303-TSnNRl9vlf1Wk0Htik3J/w@public.gmane.org>
2009-06-10 8:18 ` Wim Van Sebroeck
[not found] ` <20090610081845.GH16090-flHiHfN8CTwhDM6iD19NGrNAH6kLmebB@public.gmane.org>
2009-06-15 19:58 ` Rui Santos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A2967F6.2000303@grupopie.com \
--to=rsantos-tsnnrl9vlf1wk0htik3j/w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=arch-ArHZ4xy2k9XR7s880joybQ@public.gmane.org \
--cc=avg-+43SdJ71VxTsG83rWm+8vg@public.gmane.org \
--cc=bugzilla.kernel-iCbNM5W9OABowPkYzbXIcw@public.gmane.org \
--cc=denys-EpTYZhqHKuJnTudFRACr3A@public.gmane.org \
--cc=elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org \
--cc=kernel-testers-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=sclark46-ihVZJaRskl1bRRN4PJnoQQ@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).