Bug 79698

Summary: [ichwd] [patch] ICH watchdog driver broken
Product: Base System Reporter: Wm. Daryl Hawkins <dhawkins>
Component: kernAssignee: Doug Ambrisko <ambrisko>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.3-RELEASE   
Hardware: Any   
OS: Any   

Description Wm. Daryl Hawkins 2005-04-08 22:10:23 UTC
The ichwd driver in 5.3-RELEASE is broken.  Although the driver will load, it will not initiate a reboot if the userland daemon goes away.

Fix: 

A patch is available at http://freebsd.tamu.edu/wdog/
How-To-Repeat: Load the ichwd kernel module.  Start watchdogd with an appropriate timeout value (watchdogd -t 10).  kill -9 watchdogd
Comment 1 mike 2005-04-13 02:24:11 UTC
I have tested the patch on a number of Intel boards and it works on all of 
them.  However, one still need to use
debug.acpi.disabled="sysresource" in /boot/loader.conf


Intel 855 GME (ICH4)
ichwd module loaded
ichwd0: <Intel 82801DBM watchdog timer> on motherboard

Intenet 865 (ICH5)
ichwd module loaded
ichwd0: <Intel 82801EB/ER watchdog timer> on motherboard


On a different but somewhat related note, no luck with the ICH6.  Adding 
the defs

+       {VENDORID_INTEL, DEVICEID_82801FB, "Intel ICH6 watchdog device"},
+#define DEVICEID_82801FB        0x2640

Doesnt allow the box to be rebooted.    But then again, the ICH6 watchdog 
(Intel 915 board) never worked with any watchdog driver

Same thing with the version on the website

Loading ichwd module.
ichwd0: <Intel ICH6 watchdog device> on motherboard
ichwd0: Watchdog ready...

	---Mike
Comment 2 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2005-04-14 09:23:30 UTC
Responsible Changed
From-To: freebsd-bugs->des

ichwd is mine
Comment 3 mike 2005-09-15 17:55:19 UTC
With the submitted patches by dhawkins@tamu.edu 
(http://freebsd.tamu.edu/wdog/patch.ichwd_FreeBSD_5.3-RELEASE), and

  diff -u ichwd.h.old ichwd.h
--- ichwd.h.old Fri Sep 16 00:25:05 2005
+++ ichwd.h     Fri Sep 16 00:41:40 2005
@@ -67,6 +67,7 @@
  #define DEVICEID_82801DBM      0x24cc
  #define DEVICEID_82801E                0x2450
  #define DEVICEID_82801EBR      0x24d0
+#define DEVICEID_925XICH7      0x27b8

  /* ICH LPC Interface Bridge Registers */
  #define ICH_GEN_STA            0xd4

--- ichwd.c.old Fri Sep 16 00:41:13 2005
+++ ichwd.c     Fri Sep 16 00:42:03 2005
@@ -81,6 +81,7 @@
         { VENDORID_INTEL, DEVICEID_82801DBM, "Intel 82801DBM 
watchdog timer" },
         { VENDORID_INTEL, DEVICEID_82801E, "Intel 82801E watchdog timer" },
         { VENDORID_INTEL, DEVICEID_82801EBR, "Intel 82801EB/ER 
watchdog timer" },
+       { VENDORID_INTEL, DEVICEID_925XICH7, "Intel 925X-ICH7 
watchdog timer" },
         { 0, 0, NULL },
  };

The Intel Watchdog on my ICH7 board (925X) works as expected.

# kldload /boot/kernel/ichwd.ko
# watchdogd -t 20
# killall watchdogd
# kldunload ichwd
# dmesg | grep ichwd

ichwd module loaded
ichwd0: <Intel 925X-ICH7 watchdog timer> on motherboard
ichwd0: detaching
ichwd0: detached
ichwd module unloaded

Doing a killall -9 watchdogd

will reboot the box as expected.

You still need to add
debug.acpi.disabled="sysresource"
to /boot/loader.conf
but other than that it all works as expected on my RELENG_6 box

         ---Mike



--------------------------------------------------------------------
Mike Tancsa,                                      tel +1 519 651 3400
Sentex Communications,                            mike@sentex.net
Providing Internet since 1994                    www.sentex.net
Cambridge, Ontario Canada                         www.sentex.net/mike
Comment 4 Doug Ambrisko freebsd_committer freebsd_triage 2006-02-18 02:54:02 UTC
State Changed
From-To: open->closed

Mike alerted me to the PR.  He says my change to the ichwd fixes this. 


Comment 5 Doug Ambrisko freebsd_committer freebsd_triage 2006-02-18 02:54:02 UTC
Responsible Changed
From-To: des->ambrisko

I'll take since I've been using this feature.