[Skiboot] [PATCH 2/6] FSP/ELOG: Use elog REJECT state properly
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Tue Apr 7 22:55:26 AEST 2015
Presently we continue to read error log even though elog state is
"REJECTED". This patch fixes this by rearraning code.
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
hw/fsp/fsp-elog-read.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
index 88972ca..0442e1a 100644
--- a/hw/fsp/fsp-elog-read.c
+++ b/hw/fsp/fsp-elog-read.c
@@ -197,6 +197,11 @@ static void fsp_elog_read_complete(struct fsp_msg *read_msg)
val = (read_msg->resp->word1 >> 8) & 0xff;
fsp_freemsg(read_msg);
+ if (elog_read_from_fsp_head_state == ELOG_STATE_REJECTED) {
+ fsp_elog_set_head_state(ELOG_STATE_NONE);
+ goto elog_read_out;
+ }
+
switch (val) {
case FSP_STATUS_SUCCESS:
fsp_elog_set_head_state(ELOG_STATE_FETCHED_DATA);
@@ -219,8 +224,8 @@ static void fsp_elog_read_complete(struct fsp_msg *read_msg)
default:
fsp_elog_fetch_failure(val);
}
- if (elog_read_from_fsp_head_state == ELOG_STATE_REJECTED)
- fsp_elog_set_head_state(ELOG_STATE_NONE);
+
+elog_read_out:
unlock(&elog_read_lock);
/* Check if a new log needs fetching */
More information about the Skiboot
mailing list