]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2020 10:39:41 +0000 (12:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2020 10:39:41 +0000 (12:39 +0200)
added patches:
clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch
gpio-mockup-fix-resource-leak-in-error-path.patch
gpio-siox-explicitly-support-only-threaded-irqs.patch
gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch

queue-5.4/clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch [new file with mode: 0644]
queue-5.4/gpio-mockup-fix-resource-leak-in-error-path.patch [new file with mode: 0644]
queue-5.4/gpio-siox-explicitly-support-only-threaded-irqs.patch [new file with mode: 0644]
queue-5.4/gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch b/queue-5.4/clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch
new file mode 100644 (file)
index 0000000..57d5ec7
--- /dev/null
@@ -0,0 +1,34 @@
+From b02cf0c4736c65c6667f396efaae6b5521e82abf Mon Sep 17 00:00:00 2001
+From: Dinh Nguyen <dinguyen@kernel.org>
+Date: Mon, 31 Aug 2020 15:26:57 -0500
+Subject: clk: socfpga: stratix10: fix the divider for the emac_ptp_free_clk
+
+From: Dinh Nguyen <dinguyen@kernel.org>
+
+commit b02cf0c4736c65c6667f396efaae6b5521e82abf upstream.
+
+The fixed divider the emac_ptp_free_clk should be 2, not 4.
+
+Fixes: 07afb8db7340 ("clk: socfpga: stratix10: add clock driver for
+Stratix10 platform")
+Cc: stable@vger.kernel.org
+Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
+Link: https://lore.kernel.org/r/20200831202657.8224-1-dinguyen@kernel.org
+Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clk/socfpga/clk-s10.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clk/socfpga/clk-s10.c
++++ b/drivers/clk/socfpga/clk-s10.c
+@@ -107,7 +107,7 @@ static const struct stratix10_perip_cnt_
+       { STRATIX10_EMAC_B_FREE_CLK, "emacb_free_clk", NULL, emacb_free_mux, ARRAY_SIZE(emacb_free_mux),
+         0, 0, 2, 0xB0, 1},
+       { STRATIX10_EMAC_PTP_FREE_CLK, "emac_ptp_free_clk", NULL, emac_ptp_free_mux,
+-        ARRAY_SIZE(emac_ptp_free_mux), 0, 0, 4, 0xB0, 2},
++        ARRAY_SIZE(emac_ptp_free_mux), 0, 0, 2, 0xB0, 2},
+       { STRATIX10_GPIO_DB_FREE_CLK, "gpio_db_free_clk", NULL, gpio_db_free_mux,
+         ARRAY_SIZE(gpio_db_free_mux), 0, 0, 0, 0xB0, 3},
+       { STRATIX10_SDMMC_FREE_CLK, "sdmmc_free_clk", NULL, sdmmc_free_mux,
diff --git a/queue-5.4/gpio-mockup-fix-resource-leak-in-error-path.patch b/queue-5.4/gpio-mockup-fix-resource-leak-in-error-path.patch
new file mode 100644 (file)
index 0000000..8eb2117
--- /dev/null
@@ -0,0 +1,41 @@
+From 1b02d9e770cd7087f34c743f85ccf5ea8372b047 Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Date: Tue, 8 Sep 2020 15:07:49 +0200
+Subject: gpio: mockup: fix resource leak in error path
+
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+
+commit 1b02d9e770cd7087f34c743f85ccf5ea8372b047 upstream.
+
+If the module init function fails after creating the debugs directory,
+it's never removed. Add proper cleanup calls to avoid this resource
+leak.
+
+Fixes: 9202ba2397d1 ("gpio: mockup: implement event injecting over debugfs")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpio-mockup.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/gpio/gpio-mockup.c
++++ b/drivers/gpio/gpio-mockup.c
+@@ -497,6 +497,7 @@ static int __init gpio_mockup_init(void)
+       err = platform_driver_register(&gpio_mockup_driver);
+       if (err) {
+               gpio_mockup_err("error registering platform driver\n");
++              debugfs_remove_recursive(gpio_mockup_dbg_dir);
+               return err;
+       }
+@@ -527,6 +528,7 @@ static int __init gpio_mockup_init(void)
+                       gpio_mockup_err("error registering device");
+                       platform_driver_unregister(&gpio_mockup_driver);
+                       gpio_mockup_unregister_pdevs();
++                      debugfs_remove_recursive(gpio_mockup_dbg_dir);
+                       return PTR_ERR(pdev);
+               }
diff --git a/queue-5.4/gpio-siox-explicitly-support-only-threaded-irqs.patch b/queue-5.4/gpio-siox-explicitly-support-only-threaded-irqs.patch
new file mode 100644 (file)
index 0000000..258b959
--- /dev/null
@@ -0,0 +1,42 @@
+From 45ccf6556720293323c20cda717756014ff63007 Mon Sep 17 00:00:00 2001
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Date: Mon, 7 Sep 2020 17:31:35 +0200
+Subject: gpio: siox: explicitly support only threaded irqs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Ahmad Fatoum <a.fatoum@pengutronix.de>
+
+commit 45ccf6556720293323c20cda717756014ff63007 upstream.
+
+The gpio-siox driver uses handle_nested_irq() to implement its
+interrupt support. This is only capable of handling threaded irq
+actions. For a hardirq action it triggers a NULL pointer oops.
+(It calls action->thread_fn which is NULL then.)
+
+Prevent registration of a hardirq action by setting
+gpio_irq_chip::threaded to true.
+
+Cc: u.kleine-koenig@pengutronix.de
+Fixes: be8c8facc707 ("gpio: new driver to work with a 8x12 siox")
+Cc: stable@vger.kernel.org
+Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
+Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpio-siox.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/gpio/gpio-siox.c
++++ b/drivers/gpio/gpio-siox.c
+@@ -245,6 +245,7 @@ static int gpio_siox_probe(struct siox_d
+       girq->chip = &ddata->ichip;
+       girq->default_type = IRQ_TYPE_NONE;
+       girq->handler = handle_level_irq;
++      girq->threaded = true;
+       ret = devm_gpiochip_add_data(dev, &ddata->gchip, NULL);
+       if (ret)
diff --git a/queue-5.4/gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch b/queue-5.4/gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch
new file mode 100644 (file)
index 0000000..527f70a
--- /dev/null
@@ -0,0 +1,40 @@
+From 214b0e1ad01abf4c1f6d8d28fa096bf167e47cef Mon Sep 17 00:00:00 2001
+From: dillon min <dillon.minfei@gmail.com>
+Date: Thu, 3 Sep 2020 15:30:21 +0800
+Subject: gpio: tc35894: fix up tc35894 interrupt configuration
+
+From: dillon min <dillon.minfei@gmail.com>
+
+commit 214b0e1ad01abf4c1f6d8d28fa096bf167e47cef upstream.
+
+The offset of regmap is incorrect, j * 8 is move to the
+wrong register.
+
+for example:
+
+asume i = 0, j = 1. we want to set KPY5 as interrupt
+falling edge mode, regmap[0][1] should be TC3589x_GPIOIBE1 0xcd
+but, regmap[i] + j * 8 = TC3589x_GPIOIBE0 + 8 ,point to 0xd4,
+this is TC3589x_GPIOIE2 not TC3589x_GPIOIBE1.
+
+Fixes: d88b25be3584 ("gpio: Add TC35892 GPIO driver")
+Cc: Cc: stable@vger.kernel.org
+Signed-off-by: dillon min <dillon.minfei@gmail.com>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpio/gpio-tc3589x.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-tc3589x.c
++++ b/drivers/gpio/gpio-tc3589x.c
+@@ -209,7 +209,7 @@ static void tc3589x_gpio_irq_sync_unlock
+                               continue;
+                       tc3589x_gpio->oldregs[i][j] = new;
+-                      tc3589x_reg_write(tc3589x, regmap[i] + j * 8, new);
++                      tc3589x_reg_write(tc3589x, regmap[i] + j, new);
+               }
+       }
index 3a0371edb877a801044fdf240bde7383982a8b32..1dd20bb24a7f8d86686852b4ccbc93a4f3633297 100644 (file)
@@ -1,6 +1,10 @@
 btrfs-fix-filesystem-corruption-after-a-device-replace.patch
 mmc-sdhci-workaround-broken-command-queuing-on-intel-glk-based-irbis-models.patch
 usb-gadget-f_ncm-fix-ndp16-datagram-validation.patch
+gpio-siox-explicitly-support-only-threaded-irqs.patch
+gpio-mockup-fix-resource-leak-in-error-path.patch
+gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch
+clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch
 vsock-virtio-add-transport-parameter-to-the-virtio_t.patch
 net-virtio_vsock-enhance-connection-semantics.patch
 xfs-trim-io-to-found-cow-extent-limit.patch