aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/bt.c7
-rw-r--r--hw/fsp/fsp-ipmi.c12
2 files changed, 16 insertions, 3 deletions
diff --git a/hw/bt.c b/hw/bt.c
index 5016fea..1912cd3 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -519,9 +519,14 @@ static void bt_poll(struct timer *t __unused, void *data __unused,
bt.irq_ok ? TIMER_POLL : msecs_to_tb(BT_DEFAULT_POLL_MS));
}
-static void bt_ipmi_poll(void)
+static bool bt_ipmi_poll(void)
{
+ if (!lpc_ok())
+ return false;
+
bt_poll(NULL, NULL, mftb());
+
+ return bt.queue_len > 0;
}
static void bt_add_msg(struct bt_msg *bt_msg)
diff --git a/hw/fsp/fsp-ipmi.c b/hw/fsp/fsp-ipmi.c
index e368c28..9e600f3 100644
--- a/hw/fsp/fsp-ipmi.c
+++ b/hw/fsp/fsp-ipmi.c
@@ -243,14 +243,22 @@ static int fsp_ipmi_dequeue_msg(struct ipmi_msg *ipmi_msg)
return 0;
}
+
+static bool fsp_ipmi_poll(void)
+{
+ /* fsp_opal_poll poller checks command responses */
+ opal_run_pollers();
+
+ return !list_empty(&fsp_ipmi.msg_queue);
+}
+
static struct ipmi_backend fsp_ipmi_backend = {
.alloc_msg = fsp_ipmi_alloc_msg,
.free_msg = fsp_ipmi_free_msg,
.queue_msg = fsp_ipmi_queue_msg,
.queue_msg_head = fsp_ipmi_queue_msg_head,
.dequeue_msg = fsp_ipmi_dequeue_msg,
- /* FIXME if ever use ipmi_queue_msg_sync on FSP */
- .poll = NULL,
+ .poll = fsp_ipmi_poll,
};
static bool fsp_ipmi_rr_notify(uint32_t cmd_sub_mod,