aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2018-05-22 09:14:51 -0400
committerCorey Minyard <cminyard@mvista.com>2018-05-22 14:48:30 -0400
commitfe50a7d0393a552e4539da2d31261a59d6415950 (patch)
treee6fc65062c22a4056b540dd24cc017c7394fa04e
parent163475ebf9f3d1b516c1f8ee4f59eb8ff8e97ee8 (diff)
ipmi:bt: Set the timeout before doing a capabilities check
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
-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 fd4ea8d87d4b..a3397664f800 100644
--- a/drivers/char/ipmi/ipmi_bt_sm.c
+++ b/drivers/char/ipmi/ipmi_bt_sm.c
@@ -504,11 +504,12 @@ static enum si_sm_result bt_event(struct si_sm_data *bt, long time)
504 if (status & BT_H_BUSY) /* clear a leftover H_BUSY */ 504 if (status & BT_H_BUSY) /* clear a leftover H_BUSY */
505 BT_CONTROL(BT_H_BUSY); 505 BT_CONTROL(BT_H_BUSY);
506 506
507 bt->timeout = bt->BT_CAP_req2rsp;
508
507 /* Read BT capabilities if it hasn't been done yet */ 509 /* Read BT capabilities if it hasn't been done yet */
508 if (!bt->BT_CAP_outreqs) 510 if (!bt->BT_CAP_outreqs)
509 BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN, 511 BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN,
510 SI_SM_CALL_WITHOUT_DELAY); 512 SI_SM_CALL_WITHOUT_DELAY);
511 bt->timeout = bt->BT_CAP_req2rsp;
512 BT_SI_SM_RETURN(SI_SM_IDLE); 513 BT_SI_SM_RETURN(SI_SM_IDLE);
513 514
514 case BT_STATE_XACTION_START: 515 case BT_STATE_XACTION_START: