Skip to content

Commit b7780da

Browse files
committed
ipmi: Add shutdown functions for users and interfaces
Since things that IPMI uses can be hot-swapped, the users and interfaces really need to be able to handle this. Add the functions so the users and interfaces can implement them, the actual function will be added after everything is ready. Signed-off-by: Corey Minyard <[email protected]>
1 parent 6aa2dd0 commit b7780da

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

include/linux/ipmi.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ struct ipmi_user_hndl {
9797
* been set up to handle run to completion.
9898
*/
9999
void (*ipmi_panic_handler)(void *handler_data);
100+
101+
/*
102+
* Called when the interface has been removed. After this returns
103+
* the user handle will be invalid. The interface may or may
104+
* not be usable when this is called, but it will return errors
105+
* if it is not usable.
106+
*/
107+
void (*shutdown)(void *handler_data);
100108
};
101109

102110
/* Create a new user of the IPMI layer on the given interface number. */

include/linux/ipmi_smi.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ struct ipmi_smi_handlers {
7272
int (*start_processing)(void *send_info,
7373
ipmi_smi_t new_intf);
7474

75+
/*
76+
* When called, the low-level interface should disable all
77+
* processing, it should be complete shut down when it returns.
78+
*/
79+
void (*shutdown)(void *send_info);
80+
7581
/*
7682
* Get the detailed private info of the low level interface and store
7783
* it into the structure of ipmi_smi_data. For example: the

0 commit comments

Comments
 (0)