aboutsummaryrefslogtreecommitdiff
path: root/hw/bt.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2015-10-07 10:54:44 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-10-07 14:29:43 +1100
commit3d340f2936f87517d8d449aba31a383fec3d2d17 (patch)
treeed318f5fa16df6c16e225e3eab3d740cae3d9210 /hw/bt.c
parent55ae15b939fdb8bef393f954fe0639a579f580fa (diff)
downloadskiboot-3d340f2936f87517d8d449aba31a383fec3d2d17.zip
skiboot-3d340f2936f87517d8d449aba31a383fec3d2d17.tar.gz
skiboot-3d340f2936f87517d8d449aba31a383fec3d2d17.tar.bz2
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 <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/bt.c')
-rw-r--r--hw/bt.c3
1 files changed, 2 insertions, 1 deletions
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);