]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Aug 2023 18:56:25 +0000 (20:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Aug 2023 18:56:25 +0000 (20:56 +0200)
added patches:
gpio-sim-mark-the-gpio-chip-as-a-one-that-can-sleep.patch
gpio-ws16c48-fix-off-by-one-error-in-ws16c48-resource-region-extent.patch

queue-6.4/gpio-sim-mark-the-gpio-chip-as-a-one-that-can-sleep.patch [new file with mode: 0644]
queue-6.4/gpio-ws16c48-fix-off-by-one-error-in-ws16c48-resource-region-extent.patch [new file with mode: 0644]
queue-6.4/series

diff --git a/queue-6.4/gpio-sim-mark-the-gpio-chip-as-a-one-that-can-sleep.patch b/queue-6.4/gpio-sim-mark-the-gpio-chip-as-a-one-that-can-sleep.patch
new file mode 100644 (file)
index 0000000..9dd2cf4
--- /dev/null
@@ -0,0 +1,32 @@
+From 5a78d5db9c90c9dc84212f40a5f2687b7cafc8ec Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Date: Tue, 1 Aug 2023 21:09:51 +0200
+Subject: gpio: sim: mark the GPIO chip as a one that can sleep
+
+From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+commit 5a78d5db9c90c9dc84212f40a5f2687b7cafc8ec upstream.
+
+Simulated chips use a mutex for synchronization in driver callbacks so
+they must not be called from interrupt context. Set the can_sleep field
+of the GPIO chip to true to force users to only use threaded irqs.
+
+Fixes: cb8c474e79be ("gpio: sim: new testing module")
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-sim.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpio/gpio-sim.c
++++ b/drivers/gpio/gpio-sim.c
+@@ -429,6 +429,7 @@ static int gpio_sim_add_bank(struct fwno
+       gc->set_config = gpio_sim_set_config;
+       gc->to_irq = gpio_sim_to_irq;
+       gc->free = gpio_sim_free;
++      gc->can_sleep = true;
+       ret = devm_gpiochip_add_data(dev, gc, chip);
+       if (ret)
diff --git a/queue-6.4/gpio-ws16c48-fix-off-by-one-error-in-ws16c48-resource-region-extent.patch b/queue-6.4/gpio-ws16c48-fix-off-by-one-error-in-ws16c48-resource-region-extent.patch
new file mode 100644 (file)
index 0000000..36f001f
--- /dev/null
@@ -0,0 +1,38 @@
+From 33f83d13ded164cd49ce2a3bd2770115abc64e6f Mon Sep 17 00:00:00 2001
+From: William Breathitt Gray <william.gray@linaro.org>
+Date: Thu, 10 Aug 2023 18:00:44 -0400
+Subject: gpio: ws16c48: Fix off-by-one error in WS16C48 resource region extent
+
+From: William Breathitt Gray <william.gray@linaro.org>
+
+commit 33f83d13ded164cd49ce2a3bd2770115abc64e6f upstream.
+
+The WinSystems WS16C48 I/O address region spans offsets 0x0 through 0xA,
+which is a total of 11 bytes. Fix the WS16C48_EXTENT define to the
+correct value of 11 so that access to necessary device registers is
+properly requested in the ws16c48_probe() callback by the
+devm_request_region() function call.
+
+Fixes: 2c05a0f29f41 ("gpio: ws16c48: Implement and utilize register structures")
+Cc: stable@vger.kernel.org
+Cc: Paul Demetrotion <pdemetrotion@winsystems.com>
+Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpio/gpio-ws16c48.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-ws16c48.c
++++ b/drivers/gpio/gpio-ws16c48.c
+@@ -18,7 +18,7 @@
+ #include <linux/spinlock.h>
+ #include <linux/types.h>
+-#define WS16C48_EXTENT 10
++#define WS16C48_EXTENT 11
+ #define MAX_NUM_WS16C48 max_num_isa_dev(WS16C48_EXTENT)
+ static unsigned int base[MAX_NUM_WS16C48];
index 5ec0fa959977fe93be919f99d175b2a1a3f8d6dd..d024be7bab4d2aa3b0530af93b5dce9c801505de 100644 (file)
@@ -178,3 +178,5 @@ ibmvnic-unmap-dma-login-rsp-buffer-on-send-login-fail.patch
 ibmvnic-handle-dma-unmapping-of-login-buffs-in-release-functions.patch
 ibmvnic-do-partial-reset-on-login-failure.patch
 ibmvnic-ensure-login-failure-recovery-is-safe-from-other-resets.patch
+gpio-ws16c48-fix-off-by-one-error-in-ws16c48-resource-region-extent.patch
+gpio-sim-mark-the-gpio-chip-as-a-one-that-can-sleep.patch