The HyperNews Linux KHG Discussion Pages

## Device Driver notification of "Linux going down"

  Forum: Device Drivers
  Keywords: device drivers shutdown modules init watchdog
  Date: Tue, 06 Aug 1996 20:21:06 GMT
  From: Stan Troeh <stan@forthrt.com>

We have written a character device driver for FORTHRIGHT's PC WATCHDOG SYSTEM. We find, however, in developing a generic "watch" application (tells the hardware that Linux is still healthy) that we can't detect when Linux is intentionally shutting down. If Linux succeeds in going down and back up within the default 2 minute window, everything is transparent and no problem occurs. However we find that at times when the tolerance is set tighter or the user delays making a LILO selection, etc., that the hardware performs a physical PC Reset while Linux is doing coming up (after a shutdown -r). Is there a "shutting down" call made to the drivers? We have not found one, but have found a place where it could be added in ReadItab() or InitMain() of init.c. But that doesn't seem closely related to device driver module management. Suggestions for better ways to package the driver are welcome. We would also be willing to work on a "generic" solution (such as a device driver __halt() routine) if there is interest in this approach.

Messages

1. Through application which has opened the device by Michael K. Johnson
2. Device Driver notification of "Linux going down" by Marko Kohtala