[Skiboot] [PATCH] FSP: Set status field in response message for timed out message
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Mon Jun 12 23:29:16 AEST 2017
For timed out FSP messages, we set message status as "fsp_msg_timeout".
But most FSP driver users (like surviellance) are ignoring this field.
They always look for FSP returned status value in callback function
(second byte in word1). So we endup treating timed out message as success
response from FSP.
Sample output:
[69902.432509048,7] SURV: Sending the heartbeat command to FSP
[70023.226860117,4] FSP: Response from FSP timed out, word0 = d66a00d7, word1 = 0 state: 3
....
[70023.226901445,7] SURV: Received heartbeat acknowledge from FSP
[70023.226903251,3] FSP: fsp_trigger_reset() entry
Here SURV code thought it got valid response from FSP. But actually we didn't
receive response from FSP.
This patch fixes above issue by updating status field in response structure.
CC: Ananth N Mavinakayanahalli <ananth at linux.vnet.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth at linux.vnet.ibm.com>
---
hw/fsp/fsp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 6b18838..40b70ab 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -2175,8 +2175,11 @@ static void fsp_timeout_poll(void *data __unused)
fsp_reg_dump();
fsp_cmdclass_resp_bitmask &= ~(1ull << index);
cmdclass->timesent = 0;
- if (req->resp)
+ if (req->resp) {
req->resp->state = fsp_msg_timeout;
+ req->resp->word1 = (FSP_STATUS_BUSY << 8) |
+ (req->resp->word1 & 0xff);
+ }
fsp_complete_msg(req);
__fsp_trigger_reset();
unlock(&fsp_lock);
--
2.9.3
More information about the Skiboot
mailing list