]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.53/ipmi-bt-set-the-timeout-before-doing-a-capabilities-check.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.53 / ipmi-bt-set-the-timeout-before-doing-a-capabilities-check.patch
CommitLineData
d1cf1a50
GKH
1From fe50a7d0393a552e4539da2d31261a59d6415950 Mon Sep 17 00:00:00 2001
2From: Corey Minyard <cminyard@mvista.com>
3Date: Tue, 22 May 2018 08:14:51 -0500
4Subject: ipmi:bt: Set the timeout before doing a capabilities check
5
6From: Corey Minyard <cminyard@mvista.com>
7
8commit fe50a7d0393a552e4539da2d31261a59d6415950 upstream.
9
10There was one place where the timeout value for an operation was
11not being set, if a capabilities request was done from idle. Move
12the timeout value setting to before where that change might be
13requested.
14
15IMHO the cause here is the invisible returns in the macros. Maybe
16that's a job for later, though.
17
18Reported-by: Nordmark Claes <Claes.Nordmark@tieto.com>
19Signed-off-by: Corey Minyard <cminyard@mvista.com>
20Cc: stable@vger.kernel.org
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22
23---
24 drivers/char/ipmi/ipmi_bt_sm.c | 3 ++-
25 1 file changed, 2 insertions(+), 1 deletion(-)
26
27--- a/drivers/char/ipmi/ipmi_bt_sm.c
28+++ b/drivers/char/ipmi/ipmi_bt_sm.c
29@@ -522,11 +522,12 @@ static enum si_sm_result bt_event(struct
30 if (status & BT_H_BUSY) /* clear a leftover H_BUSY */
31 BT_CONTROL(BT_H_BUSY);
32
33+ bt->timeout = bt->BT_CAP_req2rsp;
34+
35 /* Read BT capabilities if it hasn't been done yet */
36 if (!bt->BT_CAP_outreqs)
37 BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN,
38 SI_SM_CALL_WITHOUT_DELAY);
39- bt->timeout = bt->BT_CAP_req2rsp;
40 BT_SI_SM_RETURN(SI_SM_IDLE);
41
42 case BT_STATE_XACTION_START: