]>
Commit | Line | Data |
---|---|---|
d1cf1a50 GKH |
1 | From fe50a7d0393a552e4539da2d31261a59d6415950 Mon Sep 17 00:00:00 2001 |
2 | From: Corey Minyard <cminyard@mvista.com> | |
3 | Date: Tue, 22 May 2018 08:14:51 -0500 | |
4 | Subject: ipmi:bt: Set the timeout before doing a capabilities check | |
5 | ||
6 | From: Corey Minyard <cminyard@mvista.com> | |
7 | ||
8 | commit fe50a7d0393a552e4539da2d31261a59d6415950 upstream. | |
9 | ||
10 | There was one place where the timeout value for an operation was | |
11 | not being set, if a capabilities request was done from idle. Move | |
12 | the timeout value setting to before where that change might be | |
13 | requested. | |
14 | ||
15 | IMHO the cause here is the invisible returns in the macros. Maybe | |
16 | that's a job for later, though. | |
17 | ||
18 | Reported-by: Nordmark Claes <Claes.Nordmark@tieto.com> | |
19 | Signed-off-by: Corey Minyard <cminyard@mvista.com> | |
20 | Cc: stable@vger.kernel.org | |
21 | Signed-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: |