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

Commit e54c92a9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: adsprpc: Open APPS SMD channel forever"

parents 4b46403f a967be6c
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -2819,11 +2819,10 @@ static void fastrpc_channel_close(struct kref *kref)

	ctx = container_of(kref, struct fastrpc_channel_ctx, kref);
	cid = ctx - &gcinfo[0];
	if (!me->glink)
		smd_close(ctx->chan);
	else
	if (me->glink) {
		fastrpc_glink_close(ctx->chan, cid);
		ctx->chan = NULL;
	}
	mutex_unlock(&me->smd_mutex);
	pr_info("'closed /dev/%s c %d %d'\n", gcinfo[cid].name,
						MAJOR(me->dev_no), cid);
@@ -3436,16 +3435,23 @@ static int fastrpc_channel_open(struct fastrpc_file *fl)
			if (err)
				goto bail;
			VERIFY(err, 0 == fastrpc_glink_open(cid));
		VERIFY(err,
			 wait_for_completion_timeout(&me->channel[cid].workport,
						RPC_TIMEOUT));
		} else {
		VERIFY(err, !smd_named_open_on_edge(FASTRPC_SMD_GUID,
			if (me->channel[cid].chan == NULL) {
				VERIFY(err, !smd_named_open_on_edge(
				FASTRPC_SMD_GUID,
				gcinfo[cid].channel,
				(smd_channel_t **)&me->channel[cid].chan,
				(void *)(uintptr_t)cid,
				smd_event_handler));
		}
		VERIFY(err,
			 wait_for_completion_timeout(&me->channel[cid].workport,
						RPC_TIMEOUT));

			}
		}
		if (err) {
			me->channel[cid].chan = NULL;
			goto bail;