summaryrefslogtreecommitdiffstats
path: root/drivers/slimbus
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2020-09-25 10:55:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 10:11:28 +0100
commitdd6fbde266a546e48a0e48fdab6b92c86a498ddb (patch)
tree3bf92ca731aae6ae8f8aead1820c76e1193075b6 /drivers/slimbus
parent4c8b92bc2fb9f5e4b146a849be343f7cfb58f6d1 (diff)
downloadlinux-stable-dd6fbde266a546e48a0e48fdab6b92c86a498ddb.tar.gz
linux-stable-dd6fbde266a546e48a0e48fdab6b92c86a498ddb.tar.bz2
linux-stable-dd6fbde266a546e48a0e48fdab6b92c86a498ddb.zip
slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback
[ Upstream commit 709ec3f7fc5773ac4aa6fb22c3f0ac8103c674db ] In QMI new server notification we enable the NGD however during delete server notification we do not disable the NGD. This can lead to multiple instances of NGD being enabled, so make sure that we disable NGD in delete server callback to fix this issue! Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200925095520.27316-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/slimbus')
-rw-r--r--drivers/slimbus/qcom-ngd-ctrl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index 743ee7b4e63f..218aefc3531c 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -1277,9 +1277,13 @@ static void qcom_slim_ngd_qmi_del_server(struct qmi_handle *hdl,
{
struct qcom_slim_ngd_qmi *qmi =
container_of(hdl, struct qcom_slim_ngd_qmi, svc_event_hdl);
+ struct qcom_slim_ngd_ctrl *ctrl =
+ container_of(qmi, struct qcom_slim_ngd_ctrl, qmi);
qmi->svc_info.sq_node = 0;
qmi->svc_info.sq_port = 0;
+
+ qcom_slim_ngd_enable(ctrl, false);
}
static struct qmi_ops qcom_slim_ngd_qmi_svc_event_ops = {