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

Commit df159d60 authored by Dhoat Harpal's avatar Dhoat Harpal Committed by Gerrit - the friendly Code Review server
Browse files

soc: qcom: glink_smd_xprt: Fix smd close ack for legacy channel



smd_data_ch_close sets local_legacy to false even when close_ack is
not called, this even doesn't allow process_reopen_event to call
close_ack.

smd_data_ch_close set local_legacy to false only when it sends
close_ack, otherwise it will be set to false by process_reopen_event
on sending close_ack.

CRs-Fixed: 1020947
Change-Id: I1353f3a8e625803e6317bc543b7125ce52daa49c
Signed-off-by: default avatarDhoat Harpal <hdhoat@codeaurora.org>
parent 400520a6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -731,6 +731,7 @@ static void process_reopen_event(struct work_struct *work)
		mutex_unlock(&einfo->rx_cmd_lock);
	}
	if (ch->local_legacy) {
		ch->local_legacy = false;
		mutex_lock(&einfo->rx_cmd_lock);
		einfo->xprt_if.glink_core_if_ptr->rx_cmd_ch_close_ack(
								&einfo->xprt_if,
@@ -944,6 +945,7 @@ static void smd_data_ch_close(struct channel *ch)
		ch->smd_ch = NULL;
	} else if (ch->local_legacy) {
		ch_work = kzalloc(sizeof(*ch_work), GFP_KERNEL);
		ch->local_legacy = false;
		if (ch_work) {
			ch_work->ch = ch;
			INIT_WORK(&ch_work->work, deferred_close_ack);
@@ -952,7 +954,6 @@ static void smd_data_ch_close(struct channel *ch)
	}
	mutex_unlock(&ch->ch_probe_lock);

	ch->local_legacy = false;

	spin_lock_irqsave(&ch->intents_lock, flags);
	while (!list_empty(&ch->intents)) {