[Skiboot] [PATCH] ipmi: call check_timers() while waiting for synchronous messages to complete
Cédric Le Goater
clg at kaod.org
Fri Apr 5 00:47:29 AEDT 2019
BT responses are handled using a timer doing the polling. To hope to
get an answer to an IPMI synchronous message, the timer needs to run.
This issue shows up very quickly under QEMU when loading the first
flash resource with the IPMI HIOMAP backend.
Adding a timeout would also help in reporting errors instead of
looping indefinitely waiting for a response.
Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
core/ipmi.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/core/ipmi.c b/core/ipmi.c
index 2bf3f4dabe19..78b410fd1aea 100644
--- a/core/ipmi.c
+++ b/core/ipmi.c
@@ -182,8 +182,16 @@ void ipmi_queue_msg_sync(struct ipmi_msg *msg)
ipmi_queue_msg_head(msg);
unlock(&sync_lock);
- while (sync_msg == msg)
+ /*
+ * BT response handling relies on a timer. Run timers once in
+ * a while.
+ *
+ * TODO (clg): implement a timeout for IPMI synchronous messages
+ */
+ while (sync_msg == msg) {
+ check_timers(0);
time_wait_ms(10);
+ }
}
static void ipmi_read_event_complete(struct ipmi_msg *msg)
--
2.20.1
More information about the Skiboot
mailing list