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

Commit 3483aeea 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: define separate signals for port and link states"

parents f0708c53 53a8ec9f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ struct fastrpc_channel_ctx {
	struct device *dev;
	struct fastrpc_session_ctx session[NUM_SESSIONS];
	struct completion work;
	struct completion workport;
	struct notifier_block nb;
	struct kref kref;
	int sesscount;
@@ -1378,6 +1379,7 @@ static void fastrpc_init(struct fastrpc_apps *me)
	me->channel = &gcinfo[0];
	for (i = 0; i < NUM_CHANNELS; i++) {
		init_completion(&me->channel[i].work);
		init_completion(&me->channel[i].workport);
		me->channel[i].sesscount = 0;
	}
}
@@ -1828,7 +1830,7 @@ void fastrpc_glink_notify_state(void *handle, const void *priv,
	switch (event) {
	case GLINK_CONNECTED:
		link->port_state = FASTRPC_LINK_CONNECTED;
		complete(&me->channel[cid].work);
		complete(&me->channel[cid].workport);
		break;
	case GLINK_LOCAL_DISCONNECTED:
		link->port_state = FASTRPC_LINK_DISCONNECTED;
@@ -1978,8 +1980,7 @@ static void fastrpc_glink_close(void *chan, int cid)
		return;
	link = &gfa.channel[cid].link;

	if (link->port_state == FASTRPC_LINK_CONNECTED ||
		link->port_state == FASTRPC_LINK_CONNECTING) {
	if (link->port_state == FASTRPC_LINK_CONNECTED) {
		link->port_state = FASTRPC_LINK_DISCONNECTING;
		glink_close(chan);
	}
@@ -2161,7 +2162,8 @@ static int fastrpc_channel_open(struct fastrpc_file *fl)
		if (err)
			goto bail;

		VERIFY(err, wait_for_completion_timeout(&me->channel[cid].work,
		VERIFY(err,
			 wait_for_completion_timeout(&me->channel[cid].workport,
						RPC_TIMEOUT));
		if (err) {
			me->channel[cid].chan = 0;