From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: jassisinghbrar@gmail.com, robh+dt@kernel.org, shawnguo@kernel.org
Cc: s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Robin Gong <yibin.gong@nxp.com>, Jacky Bai <ping.bai@nxp.com>,
Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 2/7] mailbox: imx: fix crash in resume on i.mx8ulp
Date: Tue, 4 Jan 2022 14:25:42 +0800 [thread overview]
Message-ID: <20220104062547.2103016-3-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20220104062547.2103016-1-peng.fan@oss.nxp.com>
From: Robin Gong <yibin.gong@nxp.com>
check 'priv->clk' before 'imx_mu_read()' otherwise crash happens on
i.mx8ulp, since clock not enabled.
Fixes: 4f0b776ef5831 ("mailbox: imx-mailbox: support i.MX8ULP MU")
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/mailbox/imx-mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index b3a2772f0aa1..76d7d399790f 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -725,7 +725,7 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
* send failed, may lead to system freeze. This issue
* is observed by testing freeze mode suspend.
*/
- if (!imx_mu_read(priv, priv->dcfg->xCR[0]) && !priv->clk) {
+ if (!priv->clk && !imx_mu_read(priv, priv->dcfg->xCR[0])) {
for (i = 0; i < IMX_MU_xCR_MAX; i++)
imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]);
}
--
2.25.1
next prev parent reply other threads:[~2022-01-04 6:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 6:25 [PATCH 0/7] mailbox: imx: misc fix and SECO MU support Peng Fan (OSS)
2022-01-04 6:25 ` [PATCH 1/7] mailbox: imx: fix wakeup failure from freeze mode Peng Fan (OSS)
2022-01-04 6:25 ` Peng Fan (OSS) [this message]
2022-01-04 6:25 ` [PATCH 3/7] mailbox: imx: Add support for identifying SCU wakeup source from sysfs Peng Fan (OSS)
2022-01-04 23:22 ` kernel test robot
2022-01-04 6:25 ` [PATCH 4/7] mailbox: imx: enlarge timeout while reading/writing messages to SCFW Peng Fan (OSS)
2022-01-04 6:25 ` [PATCH 5/7] dt-bindings: mailbox: imx-mu: add i.MX8 SECO MU support Peng Fan (OSS)
2022-01-12 1:03 ` Rob Herring
2022-01-04 6:25 ` [PATCH 6/7] mailbox: imx: introduce rxdb callback Peng Fan (OSS)
2022-01-04 6:25 ` [PATCH 7/7] mailbox: imx: add i.MX8 SECO MU support Peng Fan (OSS)
2022-01-26 8:28 ` [PATCH 0/7] mailbox: imx: misc fix and " Peng Fan
2022-01-30 0:17 ` Jassi Brar
2022-02-07 3:17 ` Peng Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220104062547.2103016-3-peng.fan@oss.nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=jassisinghbrar@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=yibin.gong@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®