aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/qcom-ipcc.c
diff options
context:
space:
mode:
authorSibi Sankar <[email protected]>2021-06-16 17:42:58 +0000
committerJassi Brar <[email protected]>2021-06-26 16:40:29 +0000
commitd6fbfdbc12745ce24bcd348dbf7e652353b3e59c (patch)
tree9379e91a03d182fadd0d07ca105bce7bf7ae9996 /drivers/mailbox/qcom-ipcc.c
parentmailbox: mtk-cmdq: Add struct cmdq_pkt in struct cmdq_cb_data (diff)
downloadkernel-d6fbfdbc12745ce24bcd348dbf7e652353b3e59c.tar.gz
kernel-d6fbfdbc12745ce24bcd348dbf7e652353b3e59c.zip
mailbox: qcom-ipcc: Fix IPCC mbox channel exhaustion
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 <[email protected]> Cc: [email protected] Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
Diffstat (limited to 'drivers/mailbox/qcom-ipcc.c')
-rw-r--r--drivers/mailbox/qcom-ipcc.c6
1 files changed, 6 insertions, 0 deletions
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)