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

Commit f3bbb995 authored by Praveen Kurapati's avatar Praveen Kurapati Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa3: Update channel start as success in flow control state



Observing race condition when we are starting the channel and
modem trying to offload flow_control on same channel. Add changes
to retrun success if channel state is flow control when trying to
start the channel.

Change-Id: Id254cd0e3e17c74e931d27cb96577224559c091e
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent 29444f60
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -175,7 +175,8 @@ static void gsi_channel_state_change_wait(unsigned long chan_hdl,
		}

		if (op == GSI_CH_START) {
			if (curr_state == GSI_CHAN_STATE_STARTED) {
			if (curr_state == GSI_CHAN_STATE_STARTED ||
				curr_state == GSI_CHAN_STATE_FLOW_CONTROL) {
				ctx->state = curr_state;
				return;
			}
@@ -2780,7 +2781,8 @@ int gsi_start_channel(unsigned long chan_hdl)
		ctx,
		GSI_START_CMD_TIMEOUT_MS, op);

	if (ctx->state != GSI_CHAN_STATE_STARTED) {
	if (ctx->state != GSI_CHAN_STATE_STARTED &&
		ctx->state != GSI_CHAN_STATE_FLOW_CONTROL) {
		/*
		* Hardware returned unexpected status, unexpected
		* hardware state.
+1 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ enum gsi_chan_state {
	GSI_CHAN_STATE_STARTED = 0x2,
	GSI_CHAN_STATE_STOPPED = 0x3,
	GSI_CHAN_STATE_STOP_IN_PROC = 0x4,
	GSI_CHAN_STATE_FLOW_CONTROL = 0x5,
	GSI_CHAN_STATE_ERROR = 0xf
};