Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp926749pxj; Wed, 16 Jun 2021 17:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyNMBgK78ckv8G/kkSIAQgJTwzzCNbDYAdeC2sdwQTt/osqqS6vgTjq8EPGZsiya7Pjw3j X-Received: by 2002:a17:907:9e2:: with SMTP id ce2mr2159515ejc.328.1623889652094; Wed, 16 Jun 2021 17:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623889652; cv=none; d=google.com; s=arc-20160816; b=QMpQilosVowJbh2Zr9WNC3VvKqjuS6iUyzi9M18cUrT9m9ZgVMtISf1yQ2gu54SaUR T/TxbXtH8m0vTCcpQLZBsv8B55uxgYM2FQmogNsRQGlMB8dftIQGXW1HrRpPxvL7FaLX f6V/iUnrm4v9Dcm8CMcap3g83E5AKW7NA2n8KucXx/lpH1nGV62MRwAEFgkZGb8qbU5J tpLijuftPHXiznloHrNIN3T8/aMuIgJGzFZL64n29lkIF5X35giFfz7XHAQ+n6iHexi6 Rsl3WBS7S49SdTmzSRG7JOmioemxsb3/fn41AY1dcVjcNEo7PDlfhhXMxSNxLi7lSqAh +xhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=JxuEFYVJLCvVBCk9gMQ8FzZXCj/3QmLbn9ez+0VSlIU=; b=tlla2OOqsXnCXk0cicgrIECSwNomi8r1n4EeculTi6hh7DOO/t4UAbyZtAMsOe2ewh bjiJbC+7nEfNAem+LykCPyBQ3xbbOInVXqY/HbnyrpmvIEVcbG8qHSO73hicIQ465SZV jgVCNBa6dJ3Q7eFe3+JTjZOpM4sYPUseI6a3eeh99IEA0SwSv6QuseL5sI3p+bI1Uv4B NpKck7SsozQXhpx3032V92c8lmeyGgP7fL+xhRibRsF4HBnv0RWrJmX0XbNWUPjWXqHq jeSdoMzz4sawYyRBMA9bXkPsclW22itnzMasweLu7sdSIASdMiDnpF541dhBCa3GEGDU LASw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=AWGXdpGl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si3735636edd.133.2021.06.16.17.27.10; Wed, 16 Jun 2021 17:27:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=AWGXdpGl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231298AbhFPRpZ (ORCPT + 99 others); Wed, 16 Jun 2021 13:45:25 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:54050 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbhFPRpX (ORCPT ); Wed, 16 Jun 2021 13:45:23 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1623865397; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=JxuEFYVJLCvVBCk9gMQ8FzZXCj/3QmLbn9ez+0VSlIU=; b=AWGXdpGlbHooHiNHMX8/a5edxv3g1B3jXyj84HZOE7ZIFza6KS9t2NfnAGD88AyOGUr1QTyn iWe30N9j1KCTiwh2LiDqgNbAUoCdqgBrouReVUjT5Ohi0GVh8AvnyvyOLUPdfPPt7kovGL/U uCG2EEIBRlS4AA+z+XhORmj1T+w= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 60ca382fed59bf69ccc5b341 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 16 Jun 2021 17:43:11 GMT Sender: sibis=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id AFE64C433D3; Wed, 16 Jun 2021 17:43:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from blr-ubuntu-87.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sibis) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2AC2BC433D3; Wed, 16 Jun 2021 17:43:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2AC2BC433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=sibis@codeaurora.org From: Sibi Sankar To: bjorn.andersson@linaro.org, jassisinghbrar@gmail.com, manivannan.sadhasivam@linaro.org Cc: agross@kernel.org, rananta@codeaurora.org, vnkgutta@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Sibi Sankar , stable@vger.kernel.org Subject: [PATCH] mailbox: qcom-ipcc: Fix IPCC mbox channel exhaustion Date: Wed, 16 Jun 2021 23:12:58 +0530 Message-Id: <1623865378-1943-1-git-send-email-sibis@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix IPCC (Inter-Processor Communication Controller) channel exhaustion by setting the channel private data to NULL on mbox shutdown. Err Logs: remoteproc: MBA booted without debug policy, loading mpss remoteproc: glink-edge: failed to acquire IPC channel remoteproc: failed to probe subdevices for remoteproc: -16 Fixes: fa74a0257f45 ("mailbox: Add support for Qualcomm IPCC") Signed-off-by: Sibi Sankar Cc: stable@vger.kernel.org --- drivers/mailbox/qcom-ipcc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mailbox/qcom-ipcc.c b/drivers/mailbox/qcom-ipcc.c index 2d13c72944c6..584700cd1585 100644 --- a/drivers/mailbox/qcom-ipcc.c +++ b/drivers/mailbox/qcom-ipcc.c @@ -155,6 +155,11 @@ static int qcom_ipcc_mbox_send_data(struct mbox_chan *chan, void *data) return 0; } +static void qcom_ipcc_mbox_shutdown(struct mbox_chan *chan) +{ + chan->con_priv = NULL; +} + static struct mbox_chan *qcom_ipcc_mbox_xlate(struct mbox_controller *mbox, const struct of_phandle_args *ph) { @@ -184,6 +189,7 @@ static struct mbox_chan *qcom_ipcc_mbox_xlate(struct mbox_controller *mbox, static const struct mbox_chan_ops ipcc_mbox_chan_ops = { .send_data = qcom_ipcc_mbox_send_data, + .shutdown = qcom_ipcc_mbox_shutdown, }; static int qcom_ipcc_setup_mbox(struct qcom_ipcc *ipcc) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project