There are couple of sysctl knobs controlling various IPMI interface itself and a watchdog device that could be a part of BMC:
- hw.ipmi.on - (seems to) enable/disable IPMI interface completely. If disabled, we [probably] should not interact with BMC at all
- hw.ipmi.wd_init_enable - (should) control watchdog initialization.
Both are enabled by default.
Upon IPMI module load, wd_startup_countdown is checked and configured if needed. If it is not configured to run, we do not reset watchdog timer at all.
This creates a problem in case a user configures hw.ipmi.wd_shutdown_countdown and reboots leaving all other knobs untouched. Watchdog is armed by ipmi_shutdown_event() and start running. It runs across machine reset, keeps running while the kernel is being loaded and eventually triggers machine reboot when it runs out.
Current patch is not a thing to be merged, but rather a starting point to elaborate on conditions when IPMI watchdog should be reset.
Should we use wd_init_enable instead or reset WD unconditionally here?