diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-08 09:19:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-08 09:19:55 -0800 |
commit | 039cd25f18b3c724e84709e8c6d5bde082a73bf1 (patch) | |
tree | cf6d4862a9f3f32b073b1b30f4c833262e57bd0c /include | |
parent | e13284da944df29ab08e8a9d2a50fc0ad1d858ab (diff) | |
parent | 038903593317691cf5f87ba1286627f5e8ab5660 (diff) | |
download | linux-039cd25f18b3c724e84709e8c6d5bde082a73bf1.tar.bz2 |
Merge tag 'for-linus-5.1' of git://github.com/cminyard/linux-ipmi
Pull IPMI updates from Corey Minyard:
"A couple of bug fixes and a bunch of code cleanup:
- Fix a use after free error in a certain error situation.
- Fix some flag handling issues in the SSIF (I2C) IPMI driver.
- A bunch of cleanups, spacing issues, converting pr_xxx to dev_xxx,
use standard UUID handling, and some other minor stuff.
- The IPMI code was creating a platform device if none was supplied.
Instead of doing that, have every source that creates an IPMI
device supply a device struct. This fixes several issues,including
a crash in one situation, and cleans things up a bit"
* tag 'for-linus-5.1' of git://github.com/cminyard/linux-ipmi:
ipmi_si: Potential array underflow in hotmod_handler()
ipmi_si: Remove hacks for adding a dummy platform devices
ipmi_si: Consolidate scanning the platform bus
ipmi_si: Remove hotmod devices on removal and exit
ipmi_si: Remove hardcode IPMI devices by scanning the platform bus
ipmi_si: Switch hotmod to use a platform device
ipmi: Consolidate the adding of platform devices
ipmi_si: Rename addr_type to addr_space to match what it does
ipmi_si: Convert some types into unsigned
ipmi_si: Fix crash when using hard-coded device
ipmi: Use dedicated API for copying a UUID
ipmi: Use defined constant for UUID representation
ipmi:ssif: Change some pr_xxx to dev_xxx calls
ipmi: kcs_bmc: handle devm_kasprintf() failure case
ipmi: Fix return value when a message is truncated
ipmi: clean an indentation issue, remove extraneous space
ipmi: Make the smi watcher be disabled immediately when not needed
ipmi: Fix how the lower layers are told to watch for messages
ipmi: Fix SSIF flag requests
ipmi_si: fix use-after-free of resource->name
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ipmi_smi.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 8c4e2ab696c3..4dc66157d872 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -31,6 +31,14 @@ struct device; struct ipmi_smi; /* + * Flags for set_check_watch() below. Tells if the SMI should be + * waiting for watchdog timeouts, commands and/or messages. + */ +#define IPMI_WATCH_MASK_CHECK_MESSAGES (1 << 0) +#define IPMI_WATCH_MASK_CHECK_WATCHDOG (1 << 1) +#define IPMI_WATCH_MASK_CHECK_COMMANDS (1 << 2) + +/* * Messages to/from the lower layer. The smi interface will take one * of these to send. After the send has occurred and a response has * been received, it will report this same data structure back up to @@ -55,8 +63,10 @@ struct ipmi_smi_msg { int rsp_size; unsigned char rsp[IPMI_MAX_MSG_LENGTH]; - /* Will be called when the system is done with the message - (presumably to free it). */ + /* + * Will be called when the system is done with the message + * (presumably to free it). + */ void (*done)(struct ipmi_smi_msg *msg); }; @@ -105,12 +115,15 @@ struct ipmi_smi_handlers { /* * Called by the upper layer when some user requires that the - * interface watch for events, received messages, watchdog - * pretimeouts, or not. Used by the SMI to know if it should - * watch for these. This may be NULL if the SMI does not - * implement it. + * interface watch for received messages and watchdog + * pretimeouts (basically do a "Get Flags", or not. Used by + * the SMI to know if it should watch for these. This may be + * NULL if the SMI does not implement it. watch_mask is from + * IPMI_WATCH_MASK_xxx above. The interface should run slower + * timeouts for just watchdog checking or faster timeouts when + * waiting for the message queue. */ - void (*set_need_watch)(void *send_info, bool enable); + void (*set_need_watch)(void *send_info, unsigned int watch_mask); /* * Called when flushing all pending messages. |