]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Oct 2021 19:04:40 +0000 (21:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Oct 2021 19:04:40 +0000 (21:04 +0200)
added patches:
pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch

queue-5.10/pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch b/queue-5.10/pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch
new file mode 100644 (file)
index 0000000..bec7795
--- /dev/null
@@ -0,0 +1,37 @@
+From c370bb474016ab9edfdabd7c08a88dd13a71ddbd Mon Sep 17 00:00:00 2001
+From: Fabien Dessenne <fabien.dessenne@foss.st.com>
+Date: Fri, 8 Oct 2021 14:25:17 +0200
+Subject: pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()
+
+From: Fabien Dessenne <fabien.dessenne@foss.st.com>
+
+commit c370bb474016ab9edfdabd7c08a88dd13a71ddbd upstream.
+
+When resuming from low power, the driver attempts to restore the
+configuration of some pins. This is done by a call to:
+  stm32_pinctrl_restore_gpio_regs(struct stm32_pinctrl *pctl, u32 pin)
+where 'pin' must be a valid pin value (i.e. matching some 'groups->pin').
+Fix the current implementation which uses some wrong 'pin' value.
+
+Fixes: e2f3cf18c3e2 ("pinctrl: stm32: add suspend/resume management")
+Signed-off-by: Fabien Dessenne <fabien.dessenne@foss.st.com>
+Link: https://lore.kernel.org/r/20211008122517.617633-1-fabien.dessenne@foss.st.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pinctrl/stm32/pinctrl-stm32.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
++++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
+@@ -1645,8 +1645,8 @@ int __maybe_unused stm32_pinctrl_resume(
+       struct stm32_pinctrl_group *g = pctl->groups;
+       int i;
+-      for (i = g->pin; i < g->pin + pctl->ngroups; i++)
+-              stm32_pinctrl_restore_gpio_regs(pctl, i);
++      for (i = 0; i < pctl->ngroups; i++, g++)
++              stm32_pinctrl_restore_gpio_regs(pctl, g->pin);
+       return 0;
+ }
index 25ffc212edd54b1a9c3d4b833ba3b3953fbee3b4..e24551eee56752aa3fd6abe7e1a6df20075be05f 100644 (file)
@@ -92,3 +92,4 @@ tracing-have-all-levels-of-checks-prevent-recursion.patch
 e1000e-separate-tgp-board-type-from-spt.patch
 selftests-bpf-fix-backported-assert_false.patch
 arm-9122-1-select-have_futex_cmpxchg.patch
+pinctrl-stm32-use-valid-pin-identifier-in-stm32_pinctrl_resume.patch