diff options
author | Corey Minyard <minyard@acm.org> | 2006-12-06 23:41:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:47 -0500 |
commit | b9675136e2ad95156fb93be6155f17590bb26fd7 (patch) | |
tree | 009bff8e0074774317b7f3921ed85122cf15bba9 /drivers/char/ipmi/ipmi_si_intf.c | |
parent | b2c03941b50944a268ee4d5823872f220809a3ba (diff) |
[PATCH] IPMI: Add maintenance mode
Some commands and operations on a BMC can cause the BMC to "go away" for a
while. This can cause the automatic flag processing and other things of that
nature to timeout and generate annoying logs, or possibly cause other bad
things to happen when in firmware update mode.
Add detection of those commands (cold reset, warm reset, and any firmware
command) and turns off automatic processing for 30 seconds. It also add a
manual override either way.
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 89cdb928061c..f04bee76ba2b 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -949,12 +949,21 @@ static int smi_start_processing(void *send_info, | |||
949 | return 0; | 949 | return 0; |
950 | } | 950 | } |
951 | 951 | ||
952 | static void set_maintenance_mode(void *send_info, int enable) | ||
953 | { | ||
954 | struct smi_info *smi_info = send_info; | ||
955 | |||
956 | if (!enable) | ||
957 | atomic_set(&smi_info->req_events, 0); | ||
958 | } | ||
959 | |||
952 | static struct ipmi_smi_handlers handlers = | 960 | static struct ipmi_smi_handlers handlers = |
953 | { | 961 | { |
954 | .owner = THIS_MODULE, | 962 | .owner = THIS_MODULE, |
955 | .start_processing = smi_start_processing, | 963 | .start_processing = smi_start_processing, |
956 | .sender = sender, | 964 | .sender = sender, |
957 | .request_events = request_events, | 965 | .request_events = request_events, |
966 | .set_maintenance_mode = set_maintenance_mode, | ||
958 | .set_run_to_completion = set_run_to_completion, | 967 | .set_run_to_completion = set_run_to_completion, |
959 | .poll = poll, | 968 | .poll = poll, |
960 | }; | 969 | }; |