From f9ec023fcb9fa27c9d360d8a954b1b7568a7660c Mon Sep 17 00:00:00 2001 From: Ashok Vuyyuru Date: Wed, 3 Feb 2021 16:02:33 +0530 Subject: [PATCH] msm: ipa3: Change to avoid the assert channel not allocated scenario When the modem channel not running if try to flow control the channel it will return not valid channel. Adding change to avoid the assert in this error condition. Change-Id: Ia9c32fbc11814e5fef3b7fbcc165439b5d03b2fa Signed-off-by: Ashok Vuyyuru --- drivers/platform/msm/gsi/gsi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/platform/msm/gsi/gsi.c b/drivers/platform/msm/gsi/gsi.c index a79f3e5d9230..12d710737ffb 100644 --- a/drivers/platform/msm/gsi/gsi.c +++ b/drivers/platform/msm/gsi/gsi.c @@ -4772,13 +4772,15 @@ int gsi_flow_control_ee(unsigned int chan_idx, unsigned int ee, res = -GSI_STATUS_RES_ALLOC_FAILURE; goto free_lock; } else if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == - GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_TYPE || - gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == - GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_INDEX){ + GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_TYPE) { GSIERR("chan_idx=%u ee=%u not in correct state\n", chan_idx, ee); GSI_ASSERT(); + } else if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == + GSI_GEN_EE_CMD_RETURN_CODE_INCORRECT_CHANNEL_INDEX) { + GSIERR("Channel ID = %u ee = %u not allocated\n", chan_idx, ee); } + if (gsi_ctx->scratch.word0.s.generic_ee_cmd_return_code == 0) { GSIERR("No response received\n"); res = -GSI_STATUS_ERROR;