[Skiboot] [PATCH v2 4/6] FSP/ELOG: Disable event notification if list is not consistent

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


Chances of elog_read_pending inconsistent state is very very
less. Just to be on safer side, disable notification  if list
is not in consistent state.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/fsp/fsp-elog-read.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
index c7582bc..b606236 100644
--- a/hw/fsp/fsp-elog-read.c
+++ b/hw/fsp/fsp-elog-read.c
@@ -315,6 +315,7 @@ static int64_t fsp_opal_elog_info(uint64_t *opal_elog_id,
 		 */
 		prlog(PR_ERR, "%s: Inconsistent internal list state !\n",
 		      __func__);
+		fsp_elog_set_head_state(ELOG_STATE_NONE);
 		unlock(&elog_read_lock);
 		return OPAL_WRONG_STATE;
 	}
@@ -355,6 +356,7 @@ static int64_t fsp_opal_elog_read(uint64_t *buffer, uint64_t opal_elog_size,
 		 */
 		prlog(PR_ERR, "%s: Inconsistent internal list state !\n",
 		      __func__);
+		fsp_elog_set_head_state(ELOG_STATE_NONE);
 		unlock(&elog_read_lock);
 		return OPAL_WRONG_STATE;
 	}
-- 
2.5.5



More information about the Skiboot mailing list