summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2018-05-22 08:14:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-07-03 11:18:45 +0200
commite6365d1bec6aea89688818d2a3bd1f77e4f725b3 (patch)
tree87af616c4fa0a54777cb88f078af6215aa726052 /drivers/char
parent291c3c760954281418000ce1aaf59924bb73cf14 (diff)
downloadlinux-stable-e6365d1bec6aea89688818d2a3bd1f77e4f725b3.tar.gz
linux-stable-e6365d1bec6aea89688818d2a3bd1f77e4f725b3.tar.bz2
linux-stable-e6365d1bec6aea89688818d2a3bd1f77e4f725b3.zip
ipmi:bt: Set the timeout before doing a capabilities check
commit fe50a7d0393a552e4539da2d31261a59d6415950 upstream. There was one place where the timeout value for an operation was not being set, if a capabilities request was done from idle. Move the timeout value setting to before where that change might be requested. IMHO the cause here is the invisible returns in the macros. Maybe that's a job for later, though. Reported-by: Nordmark Claes <Claes.Nordmark@tieto.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ipmi/ipmi_bt_sm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/ipmi/ipmi_bt_sm.c b/drivers/char/ipmi/ipmi_bt_sm.c
index 61e71616689b..84b5c746124c 100644
--- a/drivers/char/ipmi/ipmi_bt_sm.c
+++ b/drivers/char/ipmi/ipmi_bt_sm.c
@@ -522,11 +522,12 @@ static enum si_sm_result bt_event(struct si_sm_data *bt, long time)
if (status & BT_H_BUSY) /* clear a leftover H_BUSY */
BT_CONTROL(BT_H_BUSY);
+ bt->timeout = bt->BT_CAP_req2rsp;
+
/* Read BT capabilities if it hasn't been done yet */
if (!bt->BT_CAP_outreqs)
BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN,
SI_SM_CALL_WITHOUT_DELAY);
- bt->timeout = bt->BT_CAP_req2rsp;
BT_SI_SM_RETURN(SI_SM_IDLE);
case BT_STATE_XACTION_START: