]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2025 08:36:11 +0000 (10:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2025 08:36:11 +0000 (10:36 +0200)
added patches:
pwm-berlin-fix-wrong-register-in-suspend-resume.patch

queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch b/queue-5.4/pwm-berlin-fix-wrong-register-in-suspend-resume.patch
new file mode 100644 (file)
index 0000000..c5c2cd0
--- /dev/null
@@ -0,0 +1,47 @@
+From 3a4b9d027e4061766f618292df91760ea64a1fcc Mon Sep 17 00:00:00 2001
+From: Jisheng Zhang <jszhang@kernel.org>
+Date: Tue, 19 Aug 2025 19:42:24 +0800
+Subject: pwm: berlin: Fix wrong register in suspend/resume
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jisheng Zhang <jszhang@kernel.org>
+
+commit 3a4b9d027e4061766f618292df91760ea64a1fcc upstream.
+
+The 'enable' register should be BERLIN_PWM_EN rather than
+BERLIN_PWM_ENABLE, otherwise, the driver accesses wrong address, there
+will be cpu exception then kernel panic during suspend/resume.
+
+Fixes: bbf0722c1c66 ("pwm: berlin: Add suspend/resume support")
+Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
+Link: https://lore.kernel.org/r/20250819114224.31825-1-jszhang@kernel.org
+Cc: stable@vger.kernel.org
+[ukleinek: backport to 5.10]
+Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pwm/pwm-berlin.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/pwm/pwm-berlin.c
++++ b/drivers/pwm/pwm-berlin.c
+@@ -249,7 +249,7 @@ static int berlin_pwm_suspend(struct dev
+               if (!channel)
+                       continue;
+-              channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_ENABLE);
++              channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_EN);
+               channel->ctrl = berlin_pwm_readl(pwm, i, BERLIN_PWM_CONTROL);
+               channel->duty = berlin_pwm_readl(pwm, i, BERLIN_PWM_DUTY);
+               channel->tcnt = berlin_pwm_readl(pwm, i, BERLIN_PWM_TCNT);
+@@ -280,7 +280,7 @@ static int berlin_pwm_resume(struct devi
+               berlin_pwm_writel(pwm, i, channel->ctrl, BERLIN_PWM_CONTROL);
+               berlin_pwm_writel(pwm, i, channel->duty, BERLIN_PWM_DUTY);
+               berlin_pwm_writel(pwm, i, channel->tcnt, BERLIN_PWM_TCNT);
+-              berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_ENABLE);
++              berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_EN);
+       }
+       return 0;
index a3d7b3e186f82f994e208113cd53bc89b1141b45..162a973cfa8d0128e464dc09dadaed56a9c4a9bb 100644 (file)
@@ -148,3 +148,4 @@ fs-add-initramfs_options-to-set-initramfs-mount-opti.patch
 cramfs-verify-inode-mode-when-loading-from-disk.patch
 xen-events-cleanup-find_virq-return-codes.patch
 media-cx18-add-missing-check-after-dma-map.patch
+pwm-berlin-fix-wrong-register-in-suspend-resume.patch