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

Commit 904f25ef authored by Sean Tranchetti's avatar Sean Tranchetti Committed by Gerrit - the friendly Code Review server
Browse files

soc: qmi: dfc: reduce response waiting timeout



The 10s response waiting timeout is too long and sometimes blocks the
notification in the case of dropped or ignored request.
Reducing to 1000ms which is more inline with transaction latency.
Timeout value is converted to jiffies per API usage.

Change-Id: I74e63b02b7418c271740854a9e158f6562280ee4
Acked-by: default avatarNing Cai <ncai@qti.qualcomm.com>
Signed-off-by: default avatarSean Tranchetti <stranche@codeaurora.org>
parent 4504ade4
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
/*
 * Copyright (c) 2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2019, 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
@@ -70,7 +70,7 @@ static void dfc_svc_init(struct work_struct *work);
/* **************************************************** */
#define DFC_SERVICE_ID_V01 0x4E
#define DFC_SERVICE_VERS_V01 0x01
#define DFC_TIMEOUT_MS 10000
#define DFC_TIMEOUT_JF msecs_to_jiffies(1000)

#define QMI_DFC_BIND_CLIENT_REQ_V01 0x0020
#define QMI_DFC_BIND_CLIENT_RESP_V01 0x0020
@@ -659,7 +659,7 @@ dfc_bind_client_req(struct qmi_handle *dfc_handle,
		goto out;
	}

	ret = qmi_txn_wait(&txn, DFC_TIMEOUT_MS);
	ret = qmi_txn_wait(&txn, DFC_TIMEOUT_JF);
	if (ret < 0) {
		pr_err("%s() Response waiting failed, err: %d\n",
			__func__, ret);
@@ -715,7 +715,7 @@ dfc_indication_register_req(struct qmi_handle *dfc_handle,
		goto out;
	}

	ret = qmi_txn_wait(&txn, DFC_TIMEOUT_MS);
	ret = qmi_txn_wait(&txn, DFC_TIMEOUT_JF);
	if (ret < 0) {
		pr_err("%s() Response waiting failed, err: %d\n",
			__func__, ret);
@@ -769,7 +769,7 @@ dfc_get_flow_status_req(struct qmi_handle *dfc_handle,
		goto out;
	}

	ret = qmi_txn_wait(txn, DFC_TIMEOUT_MS);
	ret = qmi_txn_wait(txn, DFC_TIMEOUT_JF);
	if (ret < 0) {
		pr_err("%s() Response waiting failed, err: %d\n",
			__func__, ret);
+4 −4
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2019, 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
@@ -31,7 +31,7 @@ static void wda_svc_config(struct work_struct *work);
/* **************************************************** */
#define WDA_SERVICE_ID_V01 0x1A
#define WDA_SERVICE_VERS_V01 0x01
#define WDA_TIMEOUT_MS  20
#define WDA_TIMEOUT_JF  msecs_to_jiffies(1000)

#define QMI_WDA_SET_POWERSAVE_CONFIG_REQ_V01 0x002D
#define QMI_WDA_SET_POWERSAVE_CONFIG_RESP_V01 0x002D
@@ -241,7 +241,7 @@ static int wda_set_powersave_mode_req(void *wda_data, uint8_t enable)
		goto out;
	}

	ret = qmi_txn_wait(&txn, WDA_TIMEOUT_MS);
	ret = qmi_txn_wait(&txn, WDA_TIMEOUT_JF);
	if (ret < 0) {
		pr_err("%s() Response waiting failed, err: %d\n",
			__func__, ret);
@@ -298,7 +298,7 @@ static int wda_set_powersave_config_req(struct qmi_handle *wda_handle)
		goto out;
	}

	ret = qmi_txn_wait(&txn, WDA_TIMEOUT_MS);
	ret = qmi_txn_wait(&txn, WDA_TIMEOUT_JF);
	if (ret < 0) {
		pr_err("%s() Response waiting failed, err: %d\n",
			__func__, ret);