@@ -423,12 +423,23 @@ int ipmi_elog_commit(struct errorlog *elog_buf)
{
struct ipmi_msg *msg;
+ /*
+ * We take 'get_elog()' one more time to make sure error log will
+ * be sent to both BMC and the host, irrespective of either of them
+ * is complete or not.
+ * Reference count will be decremented on a call to
+ * 'opal_elog_complete()' and buffer object gets free on zero
+ * reference count.
+ */
+ get_elog(elog_buf);
+
/* Only log events that needs attention */
if (elog_buf->event_severity <
OPAL_PREDICTIVE_ERR_FAULT_RECTIFY_REBOOT ||
elog_buf->elog_origin != ORG_SAPPHIRE) {
prlog(PR_INFO, "dropping non severe PEL event\n");
opal_elog_complete(elog_buf, true);
+ elog_append_write_to_host(elog_buf);
return 0;
}
@@ -440,6 +451,7 @@ int ipmi_elog_commit(struct errorlog *elog_buf)
msg = ipmi_sel_alloc_msg(elog_buf);
if (!msg) {
opal_elog_complete(elog_buf, false);
+ elog_append_write_to_host(elog_buf);
return OPAL_RESOURCE;
}
@@ -450,6 +462,7 @@ int ipmi_elog_commit(struct errorlog *elog_buf)
else
ipmi_queue_msg(msg);
+ elog_append_write_to_host(elog_buf);
return 0;
}