summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorCorey Minyard <minyard@acm.org>2004-06-17 18:15:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-17 18:15:49 -0700
commitf3fbbfcca7c14569f97c27d4037651a9fe5e903a (patch)
treef96b4aa3299f976d7f45b3db6f6bf93b5a886a69 /include/linux
parent5e1c337dd7ee0b2663ddc8842cfeede985f54cd3 (diff)
[PATCH] IPMI base patch to fix channel handling and add polling
This patch fixes some problems with handling of channel detection in the driver. Some systems that are IPMI 1.5 do not implement the channel query command. Also, the interface has to be fully up before the command is ready. This patch also adds a polling interface; this is required for situations where interrupts are not running, but the system must still issue IPMI commands, like when taking a crash dump. It also updates the driver version to v32. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipmi.h10
-rw-r--r--include/linux/ipmi_msgdefs.h1
-rw-r--r--include/linux/ipmi_smi.h4
3 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index 75311f205806..a21d4a824fe0 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -373,6 +373,16 @@ int ipmi_request_supply_msgs(ipmi_user_t user,
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
* at a time, you will get an EBUSY error if the command is already
diff --git a/include/linux/ipmi_msgdefs.h b/include/linux/ipmi_msgdefs.h
index 40ed591fd84b..03e05d5529ab 100644
--- a/include/linux/ipmi_msgdefs.h
+++ b/include/linux/ipmi_msgdefs.h
@@ -71,6 +71,7 @@
#define IPMI_CC_NO_ERROR 0x00
#define IPMI_NODE_BUSY_ERR 0xc0
+#define IPMI_INVALID_COMMAND_ERR 0xc1
#define IPMI_ERR_MSG_TRUNCATED 0xc6
#define IPMI_LOST_ARBITRATION_ERR 0x81
#define IPMI_ERR_UNSPECIFIED 0xff
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h
index 6b42943ac3a3..88dd37439078 100644
--- a/include/linux/ipmi_smi.h
+++ b/include/linux/ipmi_smi.h
@@ -100,6 +100,10 @@ struct ipmi_smi_handlers
out and that none are pending, and any new requests are run
to completion immediately. */
void (*set_run_to_completion)(void *send_info, int run_to_completion);
+
+ /* Called to poll for work to do. This is so upper layers can
+ poll for operations during things like crash dumps. */
+ void (*poll)(void *send_info);
};
/* Add a low-level interface to the IPMI driver. */