[Skiboot] [PATCH 2/2] hw/bt: Update the BT state after completion
Neelesh Gupta
neelegup at linux.vnet.ibm.com
Thu Jun 25 03:10:59 AEST 2015
It is racy to update the BT state before dequeuing the message
through ipmi_cmd_done() as there is chance of new message to
fiddle the list.
Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
---
hw/bt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/bt.c b/hw/bt.c
index 9aa86b9..5b523d3 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -262,8 +262,6 @@ static void bt_get_resp(void)
ipmi_msg->data[i] = bt_inb(BT_HOST2BMC);
bt_set_h_busy(false);
- bt_set_state(BT_STATE_IDLE);
-
unlock(&bt.lock);
/*
@@ -276,6 +274,8 @@ static void bt_get_resp(void)
ipmi_cmd_done(cmd, netfn, cc, ipmi_msg);
lock(&bt.lock);
+ bt_set_state(BT_STATE_IDLE);
+
return;
}
More information about the Skiboot
mailing list