diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-18 17:06:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-18 17:06:19 -0500 |
commit | c9daa2722a3f1967e3e9750fd4cb6a7352a3cd63 (patch) | |
tree | a28c40b8e4f8ee1d653d5add903e03a9be0ede8a | |
parent | 977c8fa4d75d4ebe7ebbe116eed9e06f780fb34d (diff) | |
parent | 0d710cba3afde2109030254ee90654fbb580e8af (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[WATCHDOG] clarify watchdog operation in documentation
[WATCHDOG] Revert "Stop looking for device as soon as one is found"
-rw-r--r-- | Documentation/watchdog/watchdog-api.txt | 38 | ||||
-rw-r--r-- | drivers/watchdog/w83697hf_wdt.c | 4 |
2 files changed, 22 insertions, 20 deletions
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt index bb7cb1d31ec7..4cc4ba9d7150 100644 --- a/Documentation/watchdog/watchdog-api.txt +++ b/Documentation/watchdog/watchdog-api.txt | |||
@@ -42,23 +42,27 @@ like this source file: see Documentation/watchdog/src/watchdog-simple.c | |||
42 | A more advanced driver could for example check that a HTTP server is | 42 | A more advanced driver could for example check that a HTTP server is |
43 | still responding before doing the write call to ping the watchdog. | 43 | still responding before doing the write call to ping the watchdog. |
44 | 44 | ||
45 | When the device is closed, the watchdog is disabled. This is not | 45 | When the device is closed, the watchdog is disabled, unless the "Magic |
46 | always such a good idea, since if there is a bug in the watchdog | 46 | Close" feature is supported (see below). This is not always such a |
47 | daemon and it crashes the system will not reboot. Because of this, | 47 | good idea, since if there is a bug in the watchdog daemon and it |
48 | some of the drivers support the configuration option "Disable watchdog | 48 | crashes the system will not reboot. Because of this, some of the |
49 | shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when | 49 | drivers support the configuration option "Disable watchdog shutdown on |
50 | compiling the kernel, there is no way of disabling the watchdog once | 50 | close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when compiling |
51 | it has been started. So, if the watchdog daemon crashes, the system | 51 | the kernel, there is no way of disabling the watchdog once it has been |
52 | will reboot after the timeout has passed. Watchdog devices also usually | 52 | started. So, if the watchdog daemon crashes, the system will reboot |
53 | support the nowayout module parameter so that this option can be controlled | 53 | after the timeout has passed. Watchdog devices also usually support |
54 | at runtime. | 54 | the nowayout module parameter so that this option can be controlled at |
55 | 55 | runtime. | |
56 | Drivers will not disable the watchdog, unless a specific magic character 'V' | 56 | |
57 | has been sent /dev/watchdog just before closing the file. If the userspace | 57 | Magic Close feature: |
58 | daemon closes the file without sending this special character, the driver | 58 | |
59 | will assume that the daemon (and userspace in general) died, and will stop | 59 | If a driver supports "Magic Close", the driver will not disable the |
60 | pinging the watchdog without disabling it first. This will then cause a | 60 | watchdog unless a specific magic character 'V' has been sent to |
61 | reboot if the watchdog is not re-opened in sufficient time. | 61 | /dev/watchdog just before closing the file. If the userspace daemon |
62 | closes the file without sending this special character, the driver | ||
63 | will assume that the daemon (and userspace in general) died, and will | ||
64 | stop pinging the watchdog without disabling it first. This will then | ||
65 | cause a reboot if the watchdog is not re-opened in sufficient time. | ||
62 | 66 | ||
63 | The ioctl API: | 67 | The ioctl API: |
64 | 68 | ||
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c index 6ea125eabeaa..c622a0e6c9ae 100644 --- a/drivers/watchdog/w83697hf_wdt.c +++ b/drivers/watchdog/w83697hf_wdt.c | |||
@@ -382,10 +382,8 @@ wdt_init(void) | |||
382 | /* we will autodetect the W83697HF/HG watchdog */ | 382 | /* we will autodetect the W83697HF/HG watchdog */ |
383 | for (i = 0; ((!found) && (w83697hf_ioports[i] != 0)); i++) { | 383 | for (i = 0; ((!found) && (w83697hf_ioports[i] != 0)); i++) { |
384 | wdt_io = w83697hf_ioports[i]; | 384 | wdt_io = w83697hf_ioports[i]; |
385 | if (!w83697hf_check_wdt()) { | 385 | if (!w83697hf_check_wdt()) |
386 | found++; | 386 | found++; |
387 | break; | ||
388 | } | ||
389 | } | 387 | } |
390 | } else { | 388 | } else { |
391 | if (!w83697hf_check_wdt()) | 389 | if (!w83697hf_check_wdt()) |