From 3d340f2936f87517d8d449aba31a383fec3d2d17 Mon Sep 17 00:00:00 2001 From: Alistair Popple Date: Wed, 7 Oct 2015 10:54:44 +1100 Subject: hw/bt.c: Check for timeout after checking for message response 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 Signed-off-by: Stewart Smith --- 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); -- cgit v1.1