]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.5-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 20:22:10 +0000 (22:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 20:22:10 +0000 (22:22 +0200)
added patches:
gpio-vf610-mask-the-gpio-irq-in-system-suspend-and-support-wakeup.patch
gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch
gpiolib-acpi-add-missing-memset-0-to-acpi_get_gpiod_from_data.patch
rust-error-fix-the-description-for-echild.patch

queue-6.5/gpio-vf610-mask-the-gpio-irq-in-system-suspend-and-support-wakeup.patch [new file with mode: 0644]
queue-6.5/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch [new file with mode: 0644]
queue-6.5/gpiolib-acpi-add-missing-memset-0-to-acpi_get_gpiod_from_data.patch [new file with mode: 0644]
queue-6.5/rust-error-fix-the-description-for-echild.patch [new file with mode: 0644]
queue-6.5/series

diff --git a/queue-6.5/gpio-vf610-mask-the-gpio-irq-in-system-suspend-and-support-wakeup.patch b/queue-6.5/gpio-vf610-mask-the-gpio-irq-in-system-suspend-and-support-wakeup.patch
new file mode 100644 (file)
index 0000000..0f01cde
--- /dev/null
@@ -0,0 +1,37 @@
+From 430232619791e7de95191f2cd8ebaa4c380d17d0 Mon Sep 17 00:00:00 2001
+From: Haibo Chen <haibo.chen@nxp.com>
+Date: Tue, 17 Oct 2023 18:42:36 +0800
+Subject: gpio: vf610: mask the gpio irq in system suspend and support wakeup
+
+From: Haibo Chen <haibo.chen@nxp.com>
+
+commit 430232619791e7de95191f2cd8ebaa4c380d17d0 upstream.
+
+Add flag IRQCHIP_MASK_ON_SUSPEND to make sure gpio irq is masked on
+suspend, if lack this flag, current irq arctitecture will not mask
+the irq, and these unmasked gpio irq will wrongly wakeup the system
+even they are not config as wakeup source.
+
+Also add flag IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND to make sure the gpio
+irq which is configed as wakeup source can work as expect.
+
+Fixes: 7f2691a19627 ("gpio: vf610: add gpiolib/IRQ chip driver for Vybrid")
+Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-vf610.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-vf610.c
++++ b/drivers/gpio/gpio-vf610.c
+@@ -247,7 +247,8 @@ static const struct irq_chip vf610_irqch
+       .irq_unmask = vf610_gpio_irq_unmask,
+       .irq_set_type = vf610_gpio_irq_set_type,
+       .irq_set_wake = vf610_gpio_irq_set_wake,
+-      .flags = IRQCHIP_IMMUTABLE,
++      .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND
++                      | IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND,
+       GPIOCHIP_IRQ_RESOURCE_HELPERS,
+ };
diff --git a/queue-6.5/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch b/queue-6.5/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch
new file mode 100644 (file)
index 0000000..d358ce9
--- /dev/null
@@ -0,0 +1,41 @@
+From fc363413ef8ea842ae7a99e3caf5465dafdd3a49 Mon Sep 17 00:00:00 2001
+From: Haibo Chen <haibo.chen@nxp.com>
+Date: Wed, 18 Oct 2023 11:00:17 +0200
+Subject: gpio: vf610: set value before the direction to avoid a glitch
+
+From: Haibo Chen <haibo.chen@nxp.com>
+
+commit fc363413ef8ea842ae7a99e3caf5465dafdd3a49 upstream.
+
+We found a glitch when configuring the pad as output high. To avoid this
+glitch, move the data value setting before direction config in the
+function vf610_gpio_direction_output().
+
+Fixes: 659d8a62311f ("gpio: vf610: add imx7ulp support")
+Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
+[Bartosz: tweak the commit message]
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-vf610.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpio/gpio-vf610.c
++++ b/drivers/gpio/gpio-vf610.c
+@@ -127,14 +127,14 @@ static int vf610_gpio_direction_output(s
+       unsigned long mask = BIT(gpio);
+       u32 val;
++      vf610_gpio_set(chip, gpio, value);
++
+       if (port->sdata && port->sdata->have_paddr) {
+               val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR);
+               val |= mask;
+               vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR);
+       }
+-      vf610_gpio_set(chip, gpio, value);
+-
+       return pinctrl_gpio_direction_output(chip->base + gpio);
+ }
diff --git a/queue-6.5/gpiolib-acpi-add-missing-memset-0-to-acpi_get_gpiod_from_data.patch b/queue-6.5/gpiolib-acpi-add-missing-memset-0-to-acpi_get_gpiod_from_data.patch
new file mode 100644 (file)
index 0000000..e24e8d8
--- /dev/null
@@ -0,0 +1,37 @@
+From 479ac419206b5fe4ce4e40de61ac3210a36711aa Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Thu, 19 Oct 2023 20:34:55 +0300
+Subject: gpiolib: acpi: Add missing memset(0) to acpi_get_gpiod_from_data()
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit 479ac419206b5fe4ce4e40de61ac3210a36711aa upstream.
+
+When refactoring the acpi_get_gpiod_from_data() the change missed
+cleaning up the variable on stack. Add missing memset().
+
+Reported-by: Ferry Toth <ftoth@exalondelft.nl>
+Fixes: 16ba046e86e9 ("gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes")
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpiolib-acpi.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
+index fbda452fb4d6..51e41676de0b 100644
+--- a/drivers/gpio/gpiolib-acpi.c
++++ b/drivers/gpio/gpiolib-acpi.c
+@@ -951,6 +951,7 @@ static struct gpio_desc *acpi_get_gpiod_from_data(struct fwnode_handle *fwnode,
+       if (!propname)
+               return ERR_PTR(-EINVAL);
++      memset(&lookup, 0, sizeof(lookup));
+       lookup.index = index;
+       ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup);
+-- 
+2.42.0
+
diff --git a/queue-6.5/rust-error-fix-the-description-for-echild.patch b/queue-6.5/rust-error-fix-the-description-for-echild.patch
new file mode 100644 (file)
index 0000000..ab2d8c9
--- /dev/null
@@ -0,0 +1,44 @@
+From 17bfcd6a81535d7d580ddafb6e54806890aaca6c Mon Sep 17 00:00:00 2001
+From: Wedson Almeida Filho <walmeida@microsoft.com>
+Date: Sat, 30 Sep 2023 11:49:58 -0300
+Subject: rust: error: fix the description for `ECHILD`
+
+From: Wedson Almeida Filho <walmeida@microsoft.com>
+
+commit 17bfcd6a81535d7d580ddafb6e54806890aaca6c upstream.
+
+A mistake was made and the description of `ECHILD` is wrong (it reuses
+the description of `ENOEXEC`). This fixes it to reflect what's in
+`errno-base.h`.
+
+Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
+Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
+Reviewed-by: Trevor Gross <tmgross@umich.edu>
+Reviewed-by: Finn Behrens <me@kloenk.dev>
+Reviewed-by: Alice Ryhl <aliceryhl@google.com>
+Fixes: 266def2a0f5b ("rust: error: add codes from `errno-base.h`")
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20230930144958.46051-1-wedsonaf@gmail.com
+[ Use the plural, as noticed by Benno. ]
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ rust/kernel/error.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
+index 05fcab6abfe6..0f29e7b2194c 100644
+--- a/rust/kernel/error.rs
++++ b/rust/kernel/error.rs
+@@ -37,7 +37,7 @@ macro_rules! declare_err {
+     declare_err!(E2BIG, "Argument list too long.");
+     declare_err!(ENOEXEC, "Exec format error.");
+     declare_err!(EBADF, "Bad file number.");
+-    declare_err!(ECHILD, "Exec format error.");
++    declare_err!(ECHILD, "No child processes.");
+     declare_err!(EAGAIN, "Try again.");
+     declare_err!(ENOMEM, "Out of memory.");
+     declare_err!(EACCES, "Permission denied.");
+-- 
+2.42.0
+
index e114020a183d559d52db0984ef8f9fc2543fd099..31653975930a287fafeb3a9c0c87ca7926fcffbc 100644 (file)
@@ -212,3 +212,7 @@ platform-x86-msi-ec-fix-the-3rd-config.patch
 platform-x86-asus-wmi-change-asus_wmi_brn_down-code-from-0x20-to-0x2e.patch
 platform-x86-asus-wmi-only-map-brightness-codes-when-using-asus-wmi-backlight-control.patch
 platform-x86-asus-wmi-map-0x2a-code-ignore-0x2b-and-0x2c-events.patch
+rust-error-fix-the-description-for-echild.patch
+gpiolib-acpi-add-missing-memset-0-to-acpi_get_gpiod_from_data.patch
+gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch
+gpio-vf610-mask-the-gpio-irq-in-system-suspend-and-support-wakeup.patch