mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
rpmsg: glink: Use complete_all for open states
[ Upstream commit 4fcdaf6e28d11e2f3820d54dd23cd12a47ddd44e ] The open_req and open_ack completion variables are the state variables to represet a remote channel as open. Use complete_all so there are no races with waiters and using completion_done. Signed-off-by: Chris Lew <[email protected]> Signed-off-by: Arun Kumar Neelakantam <[email protected]> Signed-off-by: Deepak Kumar Singh <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
dfcfccd050
commit
f66125e1c4
1 changed files with 3 additions and 3 deletions
|
|
@ -970,7 +970,7 @@ static int qcom_glink_rx_open_ack(struct qcom_glink *glink, unsigned int lcid)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
complete(&channel->open_ack);
|
||||
complete_all(&channel->open_ack);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1178,7 +1178,7 @@ static int qcom_glink_announce_create(struct rpmsg_device *rpdev)
|
|||
__be32 *val = defaults;
|
||||
int size;
|
||||
|
||||
if (glink->intentless)
|
||||
if (glink->intentless || !completion_done(&channel->open_ack))
|
||||
return 0;
|
||||
|
||||
prop = of_find_property(np, "qcom,intents", NULL);
|
||||
|
|
@ -1413,7 +1413,7 @@ static int qcom_glink_rx_open(struct qcom_glink *glink, unsigned int rcid,
|
|||
channel->rcid = ret;
|
||||
spin_unlock_irqrestore(&glink->idr_lock, flags);
|
||||
|
||||
complete(&channel->open_req);
|
||||
complete_all(&channel->open_req);
|
||||
|
||||
if (create_device) {
|
||||
rpdev = kzalloc(sizeof(*rpdev), GFP_KERNEL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue