[Skiboot] [PATCH v1] core/ipmi: Provide the dequeue message interface

Neelesh Gupta neelegup at linux.vnet.ibm.com
Wed Jul 1 16:20:18 AEST 2015


Add a wrapper for the client to be able to invoke the backend
dequeue message function.

Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
Cc: Alistair Popple <alistair at popple.id.au>
---
 core/ipmi.c    |   13 +++++++++++++
 include/ipmi.h |    3 +++
 2 files changed, 16 insertions(+)

diff --git a/core/ipmi.c b/core/ipmi.c
index 9d91c26..60e9640 100644
--- a/core/ipmi.c
+++ b/core/ipmi.c
@@ -119,6 +119,19 @@ int ipmi_queue_msg(struct ipmi_msg *msg)
 	return msg->backend->queue_msg(msg);
 }
 
+int ipmi_dequeue_msg(struct ipmi_msg *msg)
+{
+	if (!ipmi_present())
+		return OPAL_HARDWARE;
+
+	if (!msg) {
+		prerror("%s: Attempting to dequeue NULL message\n", __func__);
+		return OPAL_PARAMETER;
+	}
+
+	return msg->backend->dequeue_msg(msg);
+}
+
 void ipmi_cmd_done(uint8_t cmd, uint8_t netfn, uint8_t cc, struct ipmi_msg *msg)
 {
 	msg->cc = cc;
diff --git a/include/ipmi.h b/include/ipmi.h
index 77e4b9a..f25b747 100644
--- a/include/ipmi.h
+++ b/include/ipmi.h
@@ -207,6 +207,9 @@ int ipmi_queue_msg_head(struct ipmi_msg *msg);
  * messages callback has been called. */
 void ipmi_queue_msg_sync(struct ipmi_msg *msg);
 
+/* Removes the message from the list, queued previously */
+int ipmi_dequeue_msg(struct ipmi_msg *msg);
+
 /* Process a completed message */
 void ipmi_cmd_done(uint8_t cmd, uint8_t netfn, uint8_t cc, struct ipmi_msg *msg);
 



More information about the Skiboot mailing list