diff options
| author | Corey Minyard <corey@minyard.net> | 2025-08-20 22:04:24 +0300 |
|---|---|---|
| committer | Corey Minyard <corey@minyard.net> | 2025-09-08 18:21:41 +0300 |
| commit | 9cf93a8fa9513c6d3cc65bdd50e05c1355cef322 (patch) | |
| tree | 9de9d7561e61528398a7178c0a444cf4a81b7880 /include/linux | |
| parent | abe4918a942e17f997f62b1e12bc8a15d8ff5f7e (diff) | |
| download | linux-9cf93a8fa9513c6d3cc65bdd50e05c1355cef322.tar.xz | |
ipmi: Allow an SMI sender to return an error
Getting ready for handling when a BMC is non-responsive or broken, allow
the sender operation to fail in an SMI. If it was a user-generated
message it will return the error.
The powernv code was already doing this internally, but the way it was
written could result in deep stack descent if there were a lot of
messages queued. Have its send return an error in this case.
Signed-off-by: Corey Minyard <corey@minyard.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ipmi_smi.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 5d69820d8b02..c2d975bbff60 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -109,8 +109,8 @@ struct ipmi_smi_msg { enum ipmi_smi_msg_type type; - long msgid; - void *user_data; + long msgid; + void *user_data; int data_size; unsigned char data[IPMI_MAX_MSG_LENGTH]; @@ -168,9 +168,11 @@ struct ipmi_smi_handlers { * are held when this is run. Message are delivered one at * a time by the message handler, a new message will not be * delivered until the previous message is returned. + * + * This can return an error if the SMI is not in a state where it + * can send a message. */ - void (*sender)(void *send_info, - struct ipmi_smi_msg *msg); + int (*sender)(void *send_info, struct ipmi_smi_msg *msg); /* * Called by the upper layer to request that we try to get |
