]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-5.10/mailbox-imx-fix-suspend-failue.patch
6.1-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.10 / mailbox-imx-fix-suspend-failue.patch
CommitLineData
214bad43
GKH
1From mizo@atmark-techno.com Mon Apr 15 13:17:44 2024
2From: Daisuke Mizobuchi <mizo@atmark-techno.com>
3Date: Fri, 12 Apr 2024 14:21:33 +0900
4Subject: mailbox: imx: fix suspend failue
5To: stable@vger.kernel.org
6Message-ID: <20240412052133.1805029-1-mizo@atmark-techno.com>
7
8From: Daisuke Mizobuchi <mizo@atmark-techno.com>
9
10When an interrupt occurs, it always wakes up.
11
12Suspend fails as follows:
13 armadillo:~# echo mem > /sys/power/state
14 [ 2614.602432] PM: suspend entry (deep)
15 [ 2614.610640] Filesystems sync: 0.004 seconds
16 [ 2614.618016] Freezing user space processes ... (elapsed 0.001 seconds) done.
17 [ 2614.626555] OOM killer disabled.
18 [ 2614.629792] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
19 [ 2614.638456] printk: Suspending console(s) (use no_console_suspend to debug)
20 [ 2614.649504] PM: Some devices failed to suspend, or early wake event detected
21 [ 2614.730103] PM: resume devices took 0.080 seconds
22 [ 2614.741924] OOM killer enabled.
23 [ 2614.745073] Restarting tasks ... done.
24 [ 2614.754532] PM: suspend exit
25 ash: write error: Resource busy
26 armadillo:~#
27
28Upstream is correct, so it seems to be a mistake in cheery-pick.
29
30Cc: <stable@vger.kernel.org>
31Fixes: a16f5ae8ade1 ("mailbox: imx: fix wakeup failure from freeze mode")
32Signed-off-by: Daisuke Mizobuchi <mizo@atmark-techno.com>
33Reviewed-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
34Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35---
36 drivers/mailbox/imx-mailbox.c | 8 ++++----
37 1 file changed, 4 insertions(+), 4 deletions(-)
38
39--- a/drivers/mailbox/imx-mailbox.c
40+++ b/drivers/mailbox/imx-mailbox.c
41@@ -331,8 +331,6 @@ static int imx_mu_startup(struct mbox_ch
42 break;
43 }
44
45- priv->suspend = true;
46-
47 return 0;
48 }
49
50@@ -550,8 +548,6 @@ static int imx_mu_probe(struct platform_
51
52 clk_disable_unprepare(priv->clk);
53
54- priv->suspend = false;
55-
56 return 0;
57
58 disable_runtime_pm:
59@@ -614,6 +610,8 @@ static int __maybe_unused imx_mu_suspend
60 if (!priv->clk)
61 priv->xcr = imx_mu_read(priv, priv->dcfg->xCR);
62
63+ priv->suspend = true;
64+
65 return 0;
66 }
67
68@@ -632,6 +630,8 @@ static int __maybe_unused imx_mu_resume_
69 if (!imx_mu_read(priv, priv->dcfg->xCR) && !priv->clk)
70 imx_mu_write(priv, priv->xcr, priv->dcfg->xCR);
71
72+ priv->suspend = false;
73+
74 return 0;
75 }
76