From d78cfa2316135b891ab9c503435b9e3008421344 Mon Sep 17 00:00:00 2001 From: Tharun Kumar Merugu Date: Thu, 10 Aug 2017 23:27:29 +0530 Subject: [PATCH] msm: ADSPRPC: Queue one more intent to avoid race condition Queue 2 intents for adsprpc glink channel to avoid remote processor failure for glink. One intent for threads responding back of size 16, another intent for IST failure responding without intent request of size 64. Change-Id: I85444cb0283c57ddf15cf7d1d50b827fe5339d4c Acked-by: Viswanatham Paduchuri Signed-off-by: Tharun Kumar Merugu --- drivers/char/adsprpc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index a8e23598ea58..51d05f84c398 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -2502,9 +2502,16 @@ static int fastrpc_channel_open(struct fastrpc_file *fl) kref_init(&me->channel[cid].kref); pr_info("'opened /dev/%s c %d %d'\n", gcinfo[cid].name, MAJOR(me->dev_no), cid); - err = glink_queue_rx_intent(me->channel[cid].chan, NULL, 64); - if (err) - pr_info("adsprpc: initial intent failed for %d\n", cid); + + if (me->glink) { + err = glink_queue_rx_intent(me->channel[cid].chan, + NULL, 16); + err |= glink_queue_rx_intent(me->channel[cid].chan, + NULL, 64); + if (err) + pr_warn("adsprpc: intent fail for %d err %d\n", + cid, err); + } if (cid == 0 && me->channel[cid].ssrcount != me->channel[cid].prevssrcount) { if (fastrpc_mmap_remove_ssr(fl))