Merge "msm: ADSPRPC: define separate signals for port and link states"
This commit is contained in:
commit
6cc3f85f8c
1 changed files with 7 additions and 5 deletions
|
@ -212,6 +212,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 channel;
|
||||
|
@ -1474,6 +1475,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;
|
||||
}
|
||||
}
|
||||
|
@ -2135,7 +2137,7 @@ void fastrpc_glink_notify_state(void *handle, const void *priv, unsigned event)
|
|||
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;
|
||||
|
@ -2285,8 +2287,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);
|
||||
}
|
||||
|
@ -2484,7 +2485,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;
|
||||
|
|
Loading…
Add table
Reference in a new issue