hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/linux/ipmi_smi.h
....@@ -28,7 +28,15 @@
2828 */
2929
3030 /* Structure for the low-level drivers. */
31
-typedef struct ipmi_smi *ipmi_smi_t;
31
+struct ipmi_smi;
32
+
33
+/*
34
+ * Flags for set_check_watch() below. Tells if the SMI should be
35
+ * waiting for watchdog timeouts, commands and/or messages.
36
+ */
37
+#define IPMI_WATCH_MASK_CHECK_MESSAGES (1 << 0)
38
+#define IPMI_WATCH_MASK_CHECK_WATCHDOG (1 << 1)
39
+#define IPMI_WATCH_MASK_CHECK_COMMANDS (1 << 2)
3240
3341 /*
3442 * Messages to/from the lower layer. The smi interface will take one
....@@ -55,8 +63,10 @@
5563 int rsp_size;
5664 unsigned char rsp[IPMI_MAX_MSG_LENGTH];
5765
58
- /* Will be called when the system is done with the message
59
- (presumably to free it). */
66
+ /*
67
+ * Will be called when the system is done with the message
68
+ * (presumably to free it).
69
+ */
6070 void (*done)(struct ipmi_smi_msg *msg);
6171 };
6272
....@@ -105,12 +115,15 @@
105115
106116 /*
107117 * Called by the upper layer when some user requires that the
108
- * interface watch for events, received messages, watchdog
109
- * pretimeouts, or not. Used by the SMI to know if it should
110
- * watch for these. This may be NULL if the SMI does not
111
- * implement it.
118
+ * interface watch for received messages and watchdog
119
+ * pretimeouts (basically do a "Get Flags", or not. Used by
120
+ * the SMI to know if it should watch for these. This may be
121
+ * NULL if the SMI does not implement it. watch_mask is from
122
+ * IPMI_WATCH_MASK_xxx above. The interface should run slower
123
+ * timeouts for just watchdog checking or faster timeouts when
124
+ * waiting for the message queue.
112125 */
113
- void (*set_need_watch)(void *send_info, bool enable);
126
+ void (*set_need_watch)(void *send_info, unsigned int watch_mask);
114127
115128 /*
116129 * Called when flushing all pending messages.