[Skiboot] [PATCH v2 RESEND] SEL: Fix eSEL ID while logging eSEL event

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Sun Jul 3 01:13:31 AEST 2016


Commit 127a7dac added eSEL ID to SEL event in reverse order (0700 instead
of 0007). This code fixes this issue by adding ID in proper order.

Sample SEL event output without this patch:
Event Data (RAW)      : 050700

Sample SEL event output with this patch:
Event Data (RAW)      : 050005

Fixes: 127a7dac (IPMI: Add SEL event with eSEL record ID)
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
Changes:
  Rebased on top of master

-Vasant

 hw/ipmi/ipmi-sel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
index fa888a8..d26059b 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -217,8 +217,8 @@ static void ipmi_init_esel_record(void)
 static void ipmi_update_sel_record(uint8_t event_severity, uint16_t esel_record_id)
 {
 	sel_record.record_type = SEL_REC_TYPE_SYS_EVENT;
-	sel_record.event_data2 = esel_record_id & 0xff;
-	sel_record.event_data3 = (esel_record_id >> 8) & 0xff;
+	sel_record.event_data2 = (esel_record_id >> 8) & 0xff;
+	sel_record.event_data3 = esel_record_id & 0xff;
 
 	switch (event_severity) {
 	case OPAL_ERROR_PANIC:



More information about the Skiboot mailing list