From 105012c52c7f4a15e630f427948c65786552f27a Mon Sep 17 00:00:00 2001 From: Sivan Reinstein Date: Mon, 12 Jan 2015 14:43:37 +0200 Subject: [PATCH] msm: ipa: set SSR TAG process timeout to 150msec According to experiments, 20msecs timeout is insufficient for TAG process. This change increases the timeout in a SSR scenario to 150msec. Change-Id: Ie5300d0fef5a3d5e4f772fe9ca70a1212c79ad46 Acked-by: David Arinzon Signed-off-by: Sivan Reinsten --- drivers/platform/msm/ipa/ipa.c | 10 +++------- drivers/platform/msm/ipa/ipa_utils.c | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa.c b/drivers/platform/msm/ipa/ipa.c index eeb8d5f00e8a..4d79791ddb71 100644 --- a/drivers/platform/msm/ipa/ipa.c +++ b/drivers/platform/msm/ipa/ipa.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -48,7 +48,7 @@ #define IPA_AGGR_MAX_STR_LENGTH (10) -#define CLEANUP_TAG_PROCESS_TIMEOUT 20 +#define CLEANUP_TAG_PROCESS_TIMEOUT 150 #define IPA_AGGR_STR_IN_BYTES(str) \ (strnlen((str), IPA_AGGR_MAX_STR_LENGTH - 1) + 1) @@ -1486,7 +1486,7 @@ static int ipa_q6_set_ex_path_dis_agg(void) } } - /* Will wait 20msecs for IPA tag process completion */ + /* Will wait 150msecs for IPA tag process completion */ retval = ipa_tag_process(desc, num_descs, msecs_to_jiffies(CLEANUP_TAG_PROCESS_TIMEOUT)); if (retval) { @@ -1497,10 +1497,6 @@ static int ipa_q6_set_ex_path_dis_agg(void) kfree(desc[index].user1); retval = -EINVAL; } - - /* Ignoring TAG process timeout */ - if (retval == -ETIME) - retval = 0; } kfree(desc); diff --git a/drivers/platform/msm/ipa/ipa_utils.c b/drivers/platform/msm/ipa/ipa_utils.c index 55ee33aa225e..3b8aa3157ab6 100644 --- a/drivers/platform/msm/ipa/ipa_utils.c +++ b/drivers/platform/msm/ipa/ipa_utils.c @@ -4230,7 +4230,8 @@ int ipa_tag_process(struct ipa_desc desc[], IPADBG("waiting for TAG response\n"); res = wait_for_completion_timeout(&comp->comp, timeout); if (res == 0) { - IPAERR("timeout for waiting for TAG response\n"); + IPAERR("timeout (%lu msec) on waiting for TAG response\n", + timeout); WARN_ON(1); if (atomic_dec_return(&comp->cnt) == 0) kfree(comp);