* out).
*/
struct ipmi_msg
+{
+ unsigned char netfn;
+ unsigned char cmd;
+ unsigned short data_len;
+ unsigned char __user *data;
+};
+
+struct kernel_ipmi_msg
{
unsigned char netfn;
unsigned char cmd;
ipmi_user_t user;
struct ipmi_addr addr;
long msgid;
- struct ipmi_msg msg;
+ struct kernel_ipmi_msg msg;
/* The user_msg_data is the data supplied when a message was
sent, if this is a response to a sent message. If this is
int ipmi_request(ipmi_user_t user,
struct ipmi_addr *addr,
long msgid,
- struct ipmi_msg *msg,
+ struct kernel_ipmi_msg *msg,
void *user_msg_data,
int priority);
int ipmi_request_settime(ipmi_user_t user,
struct ipmi_addr *addr,
long msgid,
- struct ipmi_msg *msg,
+ struct kernel_ipmi_msg *msg,
void *user_msg_data,
int priority,
int max_retries,
int ipmi_request_with_source(ipmi_user_t user,
struct ipmi_addr *addr,
long msgid,
- struct ipmi_msg *msg,
+ struct kernel_ipmi_msg *msg,
void *user_msg_data,
int priority,
unsigned char source_address,
int ipmi_request_supply_msgs(ipmi_user_t user,
struct ipmi_addr *addr,
long msgid,
- struct ipmi_msg *msg,
+ struct kernel_ipmi_msg *msg,
void *user_msg_data,
void *supplied_smi,
struct ipmi_recv_msg *supplied_recv,
int priority);
+/*
+ * Do polling on the IPMI interface the user is attached to. This
+ * causes the IPMI code to do an immediate check for information from
+ * the driver and handle anything that is immediately pending. This
+ * will not block in anyway. This is useful if you need to implement
+ * polling from the user like you need to send periodic watchdog pings
+ * from a crash dump, or something like that.
+ */
+void ipmi_poll_interface(ipmi_user_t user);
+
/*
* When commands come in to the SMS, the user can register to receive
* them. Only one user can be listening on a specific netfn/cmd pair
unsigned char netfn,
unsigned char cmd);
+/*
+ * Allow run-to-completion mode to be set for the interface of
+ * a specific user.
+ */
+void ipmi_user_set_run_to_completion(ipmi_user_t user, int val);
+
/*
* When the user is created, it will not receive IPMI events by
* default. The user must set this to TRUE to get incoming events.
/* Messages sent to the interface are this format. */
struct ipmi_req
{
- unsigned char *addr; /* Address to send the message to. */
+ unsigned char __user *addr; /* Address to send the message to. */
unsigned int addr_len;
long msgid; /* The sequence number for the message. This
int recv_type; /* Is this a command, response or an
asyncronous event. */
- unsigned char *addr; /* Address the message was from is put
+ unsigned char __user *addr; /* Address the message was from is put
here. The caller must supply the
memory. */
unsigned int addr_len; /* The size of the address buffer.