ipmi: run to completion fixes

The "run_to_completion" mode was somewhat broken.  Locks need to be avoided in
run_to_completion mode, and it shouldn't be used by normal users, just
internally for panic situations.

This patch removes locks in run_to_completion mode and removes the user call
for setting the mode.  The only user was the poweroff code, but it was easily
converted to use the polling interface.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Corey Minyard 2008-04-29 01:01:02 -07:00 committed by Linus Torvalds
parent 4ea1842543
commit bda4c30aa6
4 changed files with 37 additions and 45 deletions

View file

@ -368,9 +368,8 @@ int ipmi_request_supply_msgs(ipmi_user_t user,
* Poll the IPMI interface for the user. This causes the IPMI code to
* do an immediate check for information from the driver and handle
* anything that is immediately pending. This will not block in any
* way. This is useful if you need to implement polling from the user
* for things like modifying the watchdog timeout when a panic occurs
* or disabling the watchdog timer on a reboot.
* way. This is useful if you need to spin waiting for something to
* happen in the IPMI driver.
*/
void ipmi_poll_interface(ipmi_user_t user);
@ -421,12 +420,6 @@ int ipmi_unregister_for_cmd(ipmi_user_t user,
int ipmi_get_maintenance_mode(ipmi_user_t user);
int ipmi_set_maintenance_mode(ipmi_user_t user, int mode);
/*
* Allow run-to-completion mode to be set for the interface of
* a specific user.
*/
void ipmi_user_set_run_to_completion(ipmi_user_t user, int val);
/*
* When the user is created, it will not receive IPMI events by
* default. The user must set this to TRUE to get incoming events.