From: Greg Kroah-Hartman Date: Sat, 21 Oct 2023 20:22:10 +0000 (+0200) Subject: 6.5-stable patches X-Git-Tag: v4.14.328~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad802eabed1bd65ab7519728540f7e850771d923;p=thirdparty%2Fkernel%2Fstable-queue.git 6.5-stable patches 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 --- 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 index 00000000000..0f01cded736 --- /dev/null +++ b/queue-6.5/gpio-vf610-mask-the-gpio-irq-in-system-suspend-and-support-wakeup.patch @@ -0,0 +1,37 @@ +From 430232619791e7de95191f2cd8ebaa4c380d17d0 Mon Sep 17 00:00:00 2001 +From: Haibo Chen +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 + +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 +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..d358ce91a5a --- /dev/null +++ b/queue-6.5/gpio-vf610-set-value-before-the-direction-to-avoid-a-glitch.patch @@ -0,0 +1,41 @@ +From fc363413ef8ea842ae7a99e3caf5465dafdd3a49 Mon Sep 17 00:00:00 2001 +From: Haibo Chen +Date: Wed, 18 Oct 2023 11:00:17 +0200 +Subject: gpio: vf610: set value before the direction to avoid a glitch + +From: Haibo Chen + +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 +[Bartosz: tweak the commit message] +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..e24e8d877f7 --- /dev/null +++ b/queue-6.5/gpiolib-acpi-add-missing-memset-0-to-acpi_get_gpiod_from_data.patch @@ -0,0 +1,37 @@ +From 479ac419206b5fe4ce4e40de61ac3210a36711aa Mon Sep 17 00:00:00 2001 +From: Andy Shevchenko +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 + +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 +Fixes: 16ba046e86e9 ("gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes") +Signed-off-by: Andy Shevchenko +Reviewed-by: Dmitry Torokhov +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..ab2d8c9a8e9 --- /dev/null +++ b/queue-6.5/rust-error-fix-the-description-for-echild.patch @@ -0,0 +1,44 @@ +From 17bfcd6a81535d7d580ddafb6e54806890aaca6c Mon Sep 17 00:00:00 2001 +From: Wedson Almeida Filho +Date: Sat, 30 Sep 2023 11:49:58 -0300 +Subject: rust: error: fix the description for `ECHILD` + +From: Wedson Almeida Filho + +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 +Reviewed-by: Martin Rodriguez Reboredo +Reviewed-by: Trevor Gross +Reviewed-by: Finn Behrens +Reviewed-by: Alice Ryhl +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 +Signed-off-by: Greg Kroah-Hartman +--- + 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 + diff --git a/queue-6.5/series b/queue-6.5/series index e114020a183..31653975930 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -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