| .. | .. |
|---|
| 28 | 28 | */ |
|---|
| 29 | 29 | |
|---|
| 30 | 30 | /* 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) |
|---|
| 32 | 40 | |
|---|
| 33 | 41 | /* |
|---|
| 34 | 42 | * Messages to/from the lower layer. The smi interface will take one |
|---|
| .. | .. |
|---|
| 55 | 63 | int rsp_size; |
|---|
| 56 | 64 | unsigned char rsp[IPMI_MAX_MSG_LENGTH]; |
|---|
| 57 | 65 | |
|---|
| 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 | + */ |
|---|
| 60 | 70 | void (*done)(struct ipmi_smi_msg *msg); |
|---|
| 61 | 71 | }; |
|---|
| 62 | 72 | |
|---|
| .. | .. |
|---|
| 105 | 115 | |
|---|
| 106 | 116 | /* |
|---|
| 107 | 117 | * 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. |
|---|
| 112 | 125 | */ |
|---|
| 113 | | - void (*set_need_watch)(void *send_info, bool enable); |
|---|
| 126 | + void (*set_need_watch)(void *send_info, unsigned int watch_mask); |
|---|
| 114 | 127 | |
|---|
| 115 | 128 | /* |
|---|
| 116 | 129 | * Called when flushing all pending messages. |
|---|