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

Commit d29c42d1 authored by Dilip Kota's avatar Dilip Kota Committed by Gerrit - the friendly Code Review server
Browse files

slim-msm: Optimize QMI response timeout



For a Slimbus transaction through QMI, timeout
if there is no response within 500ms and return
timeout to the slimbus client.
Transactions through QMI will complete within milli
seconds. So it is better to timeout for 500ms
instead of 5 seconds.

Change-Id: I818b7c6ff7941d183e1975b21a092f37a0d94264
Signed-off-by: default avatarDilip Kota <dkota@codeaurora.org>
parent 1cba7830
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1377,7 +1377,7 @@ static int msm_slim_qmi_send_select_inst_req(struct msm_slim_ctrl *dev,
	resp_desc.ei_array = slimbus_select_inst_resp_msg_v01_ei;

	rc = qmi_send_req_wait(dev->qmi.handle, &req_desc, req, sizeof(*req),
					&resp_desc, &resp, sizeof(resp), 5000);
			&resp_desc, &resp, sizeof(resp), SLIM_QMI_RESP_TOUT);
	if (rc < 0) {
		SLIM_ERR(dev, "%s: QMI send req failed %d\n", __func__, rc);
		return rc;
@@ -1409,7 +1409,7 @@ static int msm_slim_qmi_send_power_request(struct msm_slim_ctrl *dev,
	resp_desc.ei_array = slimbus_power_resp_msg_v01_ei;

	rc = qmi_send_req_wait(dev->qmi.handle, &req_desc, req, sizeof(*req),
					&resp_desc, &resp, sizeof(resp), 5000);
			&resp_desc, &resp, sizeof(resp), SLIM_QMI_RESP_TOUT);
	if (rc < 0) {
		SLIM_ERR(dev, "%s: QMI send req failed %d\n", __func__, rc);
		return rc;
@@ -1527,7 +1527,7 @@ int msm_slim_qmi_check_framer_request(struct msm_slim_ctrl *dev)
	resp_desc.ei_array = slimbus_chkfrm_resp_msg_v01_ei;

	rc = qmi_send_req_wait(dev->qmi.handle, &req_desc, NULL, 0,
					&resp_desc, &resp, sizeof(resp), 5000);
		&resp_desc, &resp, sizeof(resp), SLIM_QMI_RESP_TOUT);
	if (rc < 0) {
		SLIM_ERR(dev, "%s: QMI send req failed %d\n", __func__, rc);
		return rc;
+3 −0
Original line number Diff line number Diff line
@@ -92,6 +92,9 @@
#define SLIMBUS_QMI_SVC_V1 1
#define SLIMBUS_QMI_INS_ID 0

/* QMI response timeout of 500ms */
#define SLIM_QMI_RESP_TOUT 500

#define PGD_THIS_EE(r, v) ((v) ? PGD_THIS_EE_V2(r) : PGD_THIS_EE_V1(r))
#define PGD_PORT(r, p, v) ((v) ? PGD_PORT_V2(r, p) : PGD_PORT_V1(r, p))
#define CFG_PORT(r, v) ((v) ? CFG_PORT_V2(r) : CFG_PORT_V1(r))