From 560dd41dff5919452f62feba5a30584a703ab1c4 Mon Sep 17 00:00:00 2001 From: Mukesh Ojha Date: Thu, 20 Jul 2017 16:11:30 +0530 Subject: [PATCH] coresight-remote-etm: Removes lock in remote_etm_rcv_msg() 'commit 9021973bacc9 ("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: Mukesh Ojha --- drivers/hwtracing/coresight/coresight-remote-etm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-remote-etm.c b/drivers/hwtracing/coresight/coresight-remote-etm.c index 30b13282f6c0..cc0b25b130d7 100644 --- a/drivers/hwtracing/coresight/coresight-remote-etm.c +++ b/drivers/hwtracing/coresight/coresight-remote-etm.c @@ -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,