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

Commit 560dd41d authored by Mukesh Ojha's avatar Mukesh Ojha
Browse files

coresight-remote-etm: Removes lock in remote_etm_rcv_msg()



'commit 9021973b ("coresight-remote-etm: Adds missing lock to avoid
race condition")' adds lock inside remote_etm_rcv_msg() which is not
needed as we are waiting inside it for a response of request made
remote_etm_enable => qmi_send_req_wait() which already holds lock
'drvdata->mutex'.

So, adding 'drvdata->mutex' inside remote_etm_rcv_msg() adds wait for
the lock and due to which not able to ack the response got which results
in timeout error qmi_send_req_wait().

This patch fixes the above mentioned issue by removing the lock added in
above mentioned commit.

Change-Id: Ie47607722ff170e012d598a2347b1c0ec6913cdf
Signed-off-by: default avatarMukesh Ojha <mojha@codeaurora.org>
parent 347dbf72
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -186,12 +186,9 @@ static void remote_etm_rcv_msg(struct work_struct *work)
	struct remote_etm_drvdata *drvdata = container_of(work,
						struct remote_etm_drvdata,
						work_rcv_msg);
	mutex_lock(&drvdata->mutex);
	if (qmi_recv_msg(drvdata->handle) < 0)
		dev_err(drvdata->dev, "%s: Error receiving QMI message\n",
			__func__);

	mutex_unlock(&drvdata->mutex);
}

static void remote_etm_notify(struct qmi_handle *handle,