Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe50a7d0 authored by Corey Minyard's avatar Corey Minyard
Browse files

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: default avatarNordmark Claes <Claes.Nordmark@tieto.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Cc: stable@vger.kernel.org
parent 163475eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -504,11 +504,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 */
		if (status & BT_H_BUSY)		/* clear a leftover H_BUSY */
			BT_CONTROL(BT_H_BUSY);
			BT_CONTROL(BT_H_BUSY);


		bt->timeout = bt->BT_CAP_req2rsp;

		/* Read BT capabilities if it hasn't been done yet */
		/* Read BT capabilities if it hasn't been done yet */
		if (!bt->BT_CAP_outreqs)
		if (!bt->BT_CAP_outreqs)
			BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN,
			BT_STATE_CHANGE(BT_STATE_CAPABILITIES_BEGIN,
					SI_SM_CALL_WITHOUT_DELAY);
					SI_SM_CALL_WITHOUT_DELAY);
		bt->timeout = bt->BT_CAP_req2rsp;
		BT_SI_SM_RETURN(SI_SM_IDLE);
		BT_SI_SM_RETURN(SI_SM_IDLE);


	case BT_STATE_XACTION_START:
	case BT_STATE_XACTION_START: