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

Commit 7353e83d authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: smd: reset current_packet in OPENING state



In SSR case after re-opening the SMD channel the current_packet is
holding the stale data index of previous packet and reading from the
wrong index cause the unexpected results.

Reset the current packet index to zero in channel re-open case.

CRs-Fixed: 774297
Change-Id: Ie38fff2c56fdf43d5669c51a70e90000f9df6f14
Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
parent 9f185f5e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1340,6 +1340,7 @@ static void smd_state_change(struct smd_channel *ch,
			ch->half_ch->set_tail(ch->recv, 0);
			ch->half_ch->set_head(ch->send, 0);
			ch->half_ch->set_fBLOCKREADINTR(ch->send, 0);
			ch->current_packet = 0;
			ch_set_state(ch, SMD_SS_OPENING);
		}
		break;