Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbbcb4e3 authored by Mohammed Javid's avatar Mohammed Javid Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa3: Fix to retry when NTN cons/prod stop fails



IPA uC can take some time to flush the pending packets
when EMAC is stopped. Need to try couple of times till
all the packets are flushed.

Change-Id: Id14cc86f6b08a4a579eaff353386ca0cab4d960b
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: default avatarMohammed Javid <mjavid@codeaurora.org>
parent e5466df0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -569,7 +569,11 @@ static int ipa3_uc_send_cmd_64b_param(u32 cmd_lo, u32 cmd_hi, u32 opcode,
		if (ipa3_ctx->uc_ctx.uc_status ==
		    IPA_HW_PROD_DISABLE_CMD_GSI_STOP_FAILURE ||
		    ipa3_ctx->uc_ctx.uc_status ==
		    IPA_HW_CONS_DISABLE_CMD_GSI_STOP_FAILURE) {
		    IPA_HW_CONS_DISABLE_CMD_GSI_STOP_FAILURE ||
		    ipa3_ctx->uc_ctx.uc_status ==
		    IPA_HW_CONS_STOP_FAILURE ||
		    ipa3_ctx->uc_ctx.uc_status ==
		    IPA_HW_PROD_STOP_FAILURE) {
			retries++;
			if (retries == IPA_GSI_CHANNEL_STOP_MAX_RETRY) {
				IPAERR("Failed after %d tries\n", retries);
+8 −2
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, 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
@@ -92,6 +92,8 @@ enum ipa3_hw_2_cpu_events {
 * @IPA_HW_INVALID_OPCODE : Invalid opcode sent
 * @IPA_HW_INVALID_PARAMS : Invalid params for the requested command
 * @IPA_HW_GSI_CH_NOT_EMPTY_FAILURE : GSI channel emptiness validation failed
 * @IPA_HW_CONS_STOP_FAILURE : NTN/ETH CONS stop failed
 * @IPA_HW_PROD_STOP_FAILURE : NTN/ETH PROD stop failed
 */
enum ipa3_hw_errors {
	IPA_HW_ERROR_NONE              =
@@ -111,7 +113,11 @@ enum ipa3_hw_errors {
	IPA_HW_PROD_DISABLE_CMD_GSI_STOP_FAILURE =
		FEATURE_ENUM_VAL(IPA_HW_FEATURE_COMMON, 7),
	IPA_HW_GSI_CH_NOT_EMPTY_FAILURE =
		FEATURE_ENUM_VAL(IPA_HW_FEATURE_COMMON, 8)
		FEATURE_ENUM_VAL(IPA_HW_FEATURE_COMMON, 8),
	IPA_HW_CONS_STOP_FAILURE =
		FEATURE_ENUM_VAL(IPA_HW_FEATURE_COMMON, 9),
	IPA_HW_PROD_STOP_FAILURE =
		FEATURE_ENUM_VAL(IPA_HW_FEATURE_COMMON, 10)
};

/**