]>
Commit | Line | Data |
---|---|---|
214bad43 GKH |
1 | From mizo@atmark-techno.com Mon Apr 15 13:17:44 2024 |
2 | From: Daisuke Mizobuchi <mizo@atmark-techno.com> | |
3 | Date: Fri, 12 Apr 2024 14:21:33 +0900 | |
4 | Subject: mailbox: imx: fix suspend failue | |
5 | To: stable@vger.kernel.org | |
6 | Message-ID: <20240412052133.1805029-1-mizo@atmark-techno.com> | |
7 | ||
8 | From: Daisuke Mizobuchi <mizo@atmark-techno.com> | |
9 | ||
10 | When an interrupt occurs, it always wakes up. | |
11 | ||
12 | Suspend 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 | ||
28 | Upstream is correct, so it seems to be a mistake in cheery-pick. | |
29 | ||
30 | Cc: <stable@vger.kernel.org> | |
31 | Fixes: a16f5ae8ade1 ("mailbox: imx: fix wakeup failure from freeze mode") | |
32 | Signed-off-by: Daisuke Mizobuchi <mizo@atmark-techno.com> | |
33 | Reviewed-by: Dominique Martinet <dominique.martinet@atmark-techno.com> | |
34 | Signed-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 |