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

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Wed Oct 14 20:22:22 AEDT 2015


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>
---
 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 a179513..8d12f3a 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -202,8 +202,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:
-- 
2.1.0



More information about the Skiboot mailing list