Bug 42801 - IT87 watchdog timer driver not working
Summary: IT87 watchdog timer driver not working
Status: ASSIGNED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Watchdog (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Wim Van Sebroeck
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-20 20:03 UTC by Mark
Modified: 2016-03-07 15:08 UTC (History)
4 users (show)

See Also:
Kernel Version: up to 3.3rc4
Subsystem:
Regression: No
Bisected commit-id:


Attachments
spec page 1 (24.77 KB, image/jpeg)
2012-02-20 20:03 UTC, Mark
Details
spec page 2 (74.87 KB, image/jpeg)
2012-02-20 20:03 UTC, Mark
Details
Workaround in case Consumer IR Buffer Underrun interrupts don't work (4.21 KB, patch)
2014-02-28 09:13 UTC, Marc van der Wal
Details | Diff

Description Mark 2012-02-20 20:03:29 UTC
Created attachment 72451 [details]
spec page 1

The watchdog daemon resets the driver via /dev/watchdog, but the machine nonetheless resets after 60 seconds.

$ modprobe it87_wdt
$ dmesg | tail -n 1
[173619.473716] IT87 WDT: Chip IT8720 revision 8 initialized. timeout=60 sec (nowayout=0 testmode=0 exclusive=1 nogameport=0)

It seems the kernel driver does not update using the correct order.

Here is what ITE sent me (including the two attachments):

1. If you wanted WDT to stop, you will need to set ¡§index 74(HWB)¡¨ and
¡§index 73h(LSB)¡¨ to 00h

2. If you wanted WDT to restart. You will need to first set ¡§index
74h(HWB)¡¨ values then set ¡§index 73h(LSB)¡¨afterwards.

Example

           writeport ( 0x72 , 0xD0)

           writeport ( 0x74 , 0x00)

           writeport ( 0x73 , 0x0F)

/ / ¡K

1. WDT to stop

           writeport ( 0x74 , 0x00)

           writeport ( 0x73 , 0x00)

2. WDT to restart

           writeport ( 0x74 , 0x00)

           writeport ( 0x73 , 0x0F)

Watch Dog Timer Spec

IT8720 LDN 07 about WDT

Register Detail Spec



See also: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/932381
Comment 1 Mark 2012-02-20 20:03:50 UTC
Created attachment 72452 [details]
spec page 2
Comment 2 Mark 2012-02-20 20:05:39 UTC
The order of 74h-73h-updates doesn't seem to be the issue. Tested that. If someone has any idea what to try, I'll be happy to assist.
Comment 3 Marc van der Wal 2014-02-28 09:11:24 UTC
I have had the same problem with an IT8728 chip. From what I understand, this driver uses the Consumer IR Buffer Underrun interrupt to reset the watchdog timer, and triggers this interrupt by writing one byte to the output register while remaining in loopback test mode.

On the specific platform on which the IT8728 chip was implemented, I found a real-mode driver (using INT 15h calls) which resets the timer by calling what seems like a "write timeout in the timeout configuration register" command whenever it needs to reset the timer.

My workaround was to reset the timer by writing the interval again and again in the right configuration register.  This worked for me: I achieved 3 days uptime on the machine I tested on, after sending SIGSTOP to the watchdog daemon process and causing a reboot within one minute.

The following patch is a workaround in case the Consumer IR Buffer Underrun interrupt method doesn't work.  I have added a "nocir" module option, 0 by default, in order not to break existing and working setups.  Setting "nocir=1" enables the workaround.
Comment 4 Marc van der Wal 2014-02-28 09:13:47 UTC
Created attachment 127661 [details]
Workaround in case Consumer IR Buffer Underrun interrupts don't work

This is initially a patch to the 3.5.7 kernel but also applies fine on 3.10.28. I know I should have tried on the very latest kernels, but I'll assume the it87 driver hasn't changed since then.

Note You need to log in before you can comment on or make changes to this bug.