From 20535c9615acf897886c49ada522200bcb7dcb06 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Oct 2025 10:36:23 +0200 Subject: [PATCH] 5.10-stable patches added patches: pwm-berlin-fix-wrong-register-in-suspend-resume.patch --- ...fix-wrong-register-in-suspend-resume.patch | 47 +++++++++++++++++++ queue-5.10/series | 1 + 2 files changed, 48 insertions(+) create mode 100644 queue-5.10/pwm-berlin-fix-wrong-register-in-suspend-resume.patch diff --git a/queue-5.10/pwm-berlin-fix-wrong-register-in-suspend-resume.patch b/queue-5.10/pwm-berlin-fix-wrong-register-in-suspend-resume.patch new file mode 100644 index 0000000000..c5c2cd0039 --- /dev/null +++ b/queue-5.10/pwm-berlin-fix-wrong-register-in-suspend-resume.patch @@ -0,0 +1,47 @@ +From 3a4b9d027e4061766f618292df91760ea64a1fcc Mon Sep 17 00:00:00 2001 +From: Jisheng Zhang +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 + +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 +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 +Signed-off-by: Greg Kroah-Hartman +--- + 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; diff --git a/queue-5.10/series b/queue-5.10/series index 5a02201487..5cb82e116b 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -228,3 +228,4 @@ wifi-rt2x00-use-explicitly-signed-or-unsigned-types.patch kvm-arm64-prevent-access-to-vcpu-events-before-init.patch jbd2-ensure-that-all-ongoing-i-o-complete-before-freeing-blocks.patch ext4-detect-invalid-inline_data-extents-flag-combination.patch +pwm-berlin-fix-wrong-register-in-suspend-resume.patch -- 2.47.3