From 6fe711278074a6c7380eca0101a9cebda1b85419 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Sat, 2 Jul 2016 21:03:41 +0530 Subject: FSP/ELOG: Disable event notification if list is not consistent 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 Reviewed-by: Mukesh Ojha Signed-off-by: Stewart Smith (cherry picked from commit 1fb10de164d3ca034193df81c1f5d007aec37781) Signed-off-by: Stewart Smith --- 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 5814aab..135dfe7 100644 --- a/hw/fsp/fsp-elog-read.c +++ b/hw/fsp/fsp-elog-read.c @@ -299,6 +299,7 @@ static int64_t fsp_opal_elog_info(uint64_t *opal_elog_id, if (!log_data) { 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; } @@ -334,6 +335,7 @@ static int64_t fsp_opal_elog_read(uint64_t *buffer, uint64_t opal_elog_size, if (!log_data) { 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; } -- cgit v1.1