summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmi/runtime
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2016-01-18 11:27:52 -0600
committerStephen Cprek <smcprek@us.ibm.com>2016-02-19 17:06:15 -0600
commit6e1541d8bb6fbdbccf963941db9ab79bae2365e9 (patch)
tree3ca32ba7752a048e8775fe5074c4b539ac0dc71f /src/usr/ipmi/runtime
parentecb3640364de919e9a22683338cb46b8858073ca (diff)
downloadtalos-hostboot-6e1541d8bb6fbdbccf963941db9ab79bae2365e9.tar.gz
talos-hostboot-6e1541d8bb6fbdbccf963941db9ab79bae2365e9.zip
Set watchdog and set sensors are now asynchronous sends
Backport: master-p8 Change-Id: If8741e67986c6d6df95a655fb5669df764649e82 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18993 Tested-by: Jenkins Server Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi/runtime')
-rw-r--r--src/usr/ipmi/runtime/rt_ipmirp.C33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/usr/ipmi/runtime/rt_ipmirp.C b/src/usr/ipmi/runtime/rt_ipmirp.C
index f3bb8c714..69d7c4feb 100644
--- a/src/usr/ipmi/runtime/rt_ipmirp.C
+++ b/src/usr/ipmi/runtime/rt_ipmirp.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015 */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -157,4 +157,35 @@ namespace IPMI
return err;
} // sendrecv
+
+ /*
+ * @brief Asynchronus message send
+ *
+ * @param[in] i_cmd, the command we're sending
+ * @param[in] i_len, the length of the data
+ * @param[in] i_data, the data we're sending
+ * @param[in] i_type, the type of message we're sending
+ *
+ */
+ errlHndl_t send(const IPMI::command_t& i_cmd,
+ size_t i_len, uint8_t* i_data,
+ IPMI::message_type i_type)
+ {
+ IPMI::completion_code l_cc = IPMI::CC_UNKBAD;
+
+ // We are calling a synchronous send in an asynchronous function
+ // This is needed to enable asynchronous message sending before
+ // runtime. A message should be synchronous during runtime, but
+ // by ignoring the cc returned and clearing the data, we're making
+ // a synchronous function "asynchronous".
+ errlHndl_t l_err = sendrecv(i_cmd,l_cc,i_len,i_data);
+
+ if(i_data != NULL)
+ {
+ delete i_data;
+ }
+
+ return l_err;
+ }
+
};
OpenPOWER on IntegriCloud