diff options
Diffstat (limited to 'Documentation/watchdog/watchdog-api.txt')
-rw-r--r-- | Documentation/watchdog/watchdog-api.txt | 38 |
1 files changed, 21 insertions, 17 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 | ||