Revert "soc: qcom: glink_smd_xprt: Fix race condition of open ack"
commit 347fe47cccb8 ("soc: qcom: glink_smd_xprt: Fix race condition of open ack"). After SSR, GLINK_CTRL channel remains up, IPC router send open over GLINK_CTRL channel. Then process_ctl_event process the ack sent by remote side and add platform driver without notifyig glink core.Later platform_driver get probed, the channel has opened and glink is notified of only remote_open event. Therefore local state will never reach LOCAL_OPENED. glink core should be notified about open ack from precess_ctl_event on receiving open ack event. CRs-Fixed: 974508 Change-Id: Ibbed8e680246659af2c6b58d91a62b9ff805d43c Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
This commit is contained in:
parent
f87adb2565
commit
f5aa8456ea
1 changed files with 7 additions and 14 deletions
|
@ -155,8 +155,6 @@ struct channel {
|
|||
bool remote_legacy;
|
||||
size_t intent_req_size;
|
||||
spinlock_t rx_data_lock;
|
||||
uint32_t priority;
|
||||
bool open_ack_received;
|
||||
bool streaming_ch;
|
||||
bool tx_resume_needed;
|
||||
};
|
||||
|
@ -410,9 +408,13 @@ static void process_ctl_event(struct work_struct *work)
|
|||
continue;
|
||||
}
|
||||
|
||||
ch->open_ack_received = true;
|
||||
ch->priority = cmd.priority;
|
||||
add_platform_driver(ch);
|
||||
mutex_lock(&einfo->rx_cmd_lock);
|
||||
einfo->xprt_if.glink_core_if_ptr->rx_cmd_ch_open_ack(
|
||||
&einfo->xprt_if,
|
||||
cmd.id,
|
||||
cmd.priority);
|
||||
mutex_unlock(&einfo->rx_cmd_lock);
|
||||
} else if (cmd.cmd == CMD_CLOSE) {
|
||||
SMDXPRT_INFO(einfo, "%s RX REMOTE CLOSE rcid %u\n",
|
||||
__func__, cmd.id);
|
||||
|
@ -596,15 +598,6 @@ static void process_open_event(struct work_struct *work)
|
|||
ch->name,
|
||||
SMD_TRANS_XPRT_ID);
|
||||
mutex_unlock(&einfo->rx_cmd_lock);
|
||||
} else if (ch->open_ack_received) {
|
||||
SMDXPRT_INFO(einfo, "%s RX OPEN ACK lcid %u; xprt_req %u\n",
|
||||
__func__, ch->lcid, ch->priority);
|
||||
mutex_lock(&einfo->rx_cmd_lock);
|
||||
einfo->xprt_if.glink_core_if_ptr->rx_cmd_ch_open_ack(
|
||||
&einfo->xprt_if,
|
||||
ch->lcid,
|
||||
ch->priority);
|
||||
mutex_unlock(&einfo->rx_cmd_lock);
|
||||
}
|
||||
kfree(ch_work);
|
||||
}
|
||||
|
@ -1218,7 +1211,7 @@ static int tx_cmd_ch_open(struct glink_transport_if *if_ptr, uint32_t lcid,
|
|||
|
||||
ch->tx_resume_needed = false;
|
||||
ch->lcid = lcid;
|
||||
ch->open_ack_received = false;
|
||||
|
||||
if (einfo->smd_ctl_ch_open) {
|
||||
SMDXPRT_INFO(einfo, "%s TX OPEN '%s' lcid %u reqxprt %u\n",
|
||||
__func__, name, lcid, req_xprt);
|
||||
|
|
Loading…
Add table
Reference in a new issue