[Skiboot] [PATCH] hw/bt.c: Check for timeout after checking for message response

Alistair Popple alistair at popple.id.au
Wed Oct 7 10:54:44 AEDT 2015


When deciding if a BT message has timed out we should first check for
a message response. This will ensure that messages will not time out
if there was a delay calling the pollers.

Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 hw/bt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/bt.c b/hw/bt.c
index 41fe24e..a53ff14 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -368,7 +368,6 @@ static void bt_poll(struct timer *t __unused, void *data __unused,
 	lock(&bt.lock);
 
 	print_debug_queue_info();
-	bt_expire_old_msg(now);
 
 	bt_ctrl = bt_inb(BT_CTRL);
 
@@ -377,6 +376,8 @@ static void bt_poll(struct timer *t __unused, void *data __unused,
 	    (bt_ctrl & BT_CTRL_B2H_ATN))
 		bt_get_resp();
 
+	bt_expire_old_msg(now);
+
 	/* Check for sms_atn */
 	if (bt_inb(BT_CTRL) & BT_CTRL_SMS_ATN) {
 		bt_outb(BT_CTRL_SMS_ATN, BT_CTRL);
-- 
2.1.4



More information about the Skiboot mailing list