summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-04-04 15:47:29 +0200
committerRaptor Engineering Development Team <support@raptorengineering.com>2019-04-30 18:33:14 +0000
commit9858186353f2203fe477f316964e03609d12fd1d (patch)
tree2b59df79425c62858c2f91a6a799213e8a5e0836
parent48661b7267f49ad65383a1a6aff300a88b55dbf6 (diff)
downloadblackbird-skiboot-9858186353f2203fe477f316964e03609d12fd1d.tar.gz
blackbird-skiboot-9858186353f2203fe477f316964e03609d12fd1d.zip
ipmi: call check_timers() while waiting for synchronous messages to complete
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@kaod.org>
-rw-r--r--core/ipmi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/ipmi.c b/core/ipmi.c
index 2bf3f4da..78b410fd 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)
OpenPOWER on IntegriCloud