From patchwork Tue Oct 27 13:51:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15972C388F9 for ; Tue, 27 Oct 2020 14:36:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFEC022265 for ; Tue, 27 Oct 2020 14:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809361; bh=9WdmU2y5Hb50+xVyzWBOdpjFa04cJL6qQFdPOBX6EUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AlqSeqKp/k+Sldry8Wk8HASzwT/KpI1xYH+S5QE+pc/dvnVCbz2H0nPXWakhCxmw5 FbKeMKgfPrWDm9wVJchqTUF8EqFsVEFRvsfkSqHqobxt6eiaobpGXizYXTr3TjV6Vr Hy+cLgk3P5tZgUfm3aQIlNQw6/oq6ZYFGb3WtBUE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760703AbgJ0Of7 (ORCPT ); Tue, 27 Oct 2020 10:35:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:34796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760701AbgJ0Of7 (ORCPT ); Tue, 27 Oct 2020 10:35:59 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2972B207BB; Tue, 27 Oct 2020 14:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809358; bh=9WdmU2y5Hb50+xVyzWBOdpjFa04cJL6qQFdPOBX6EUg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zStpM1Dz6TvMB5n2bx4ihK9JVmIjiCmGyfFXQ03qXqEUwM+SN6NR6uCGGUEY28It/ PyumhMyROpjjPMIvjEEdf2dw4ruiji9M45ARFUABeYgrbc25RtJK3FvAaG8KlDlchp a6foMU27oLL66Exx7ztXv8U2M014ktd3rYpCTABs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Srinivas Kandagatla , Sasha Levin Subject: [PATCH 5.4 167/408] slimbus: qcom-ngd-ctrl: disable ngd in qmi server down callback Date: Tue, 27 Oct 2020 14:51:45 +0100 Message-Id: <20201027135502.846496729@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla [ 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 Link: https://lore.kernel.org/r/20200925095520.27316-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/slimbus/qcom-ngd-ctrl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c index 01a17d84b6064..ce265bf7de868 100644 --- a/drivers/slimbus/qcom-ngd-ctrl.c +++ b/drivers/slimbus/qcom-ngd-ctrl.c @@ -1273,9 +1273,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 = {