]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2020 10:39:27 +0000 (12:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2020 10:39:27 +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-tc35894-fix-up-tc35894-interrupt-configuration.patch

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

diff --git a/queue-4.19/clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch b/queue-4.19/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-4.19/gpio-mockup-fix-resource-leak-in-error-path.patch b/queue-4.19/gpio-mockup-fix-resource-leak-in-error-path.patch
new file mode 100644 (file)
index 0000000..889141a
--- /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
+@@ -367,6 +367,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;
+       }
+@@ -386,6 +387,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-4.19/gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch b/queue-4.19/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 d9a847dbfeb575ea874a7b6e37787161af0efdff..7a4512c07edf11689afe48e8e60ad37b72ddfcaf 100644 (file)
@@ -1,5 +1,8 @@
 mmc-sdhci-workaround-broken-command-queuing-on-intel-glk-based-irbis-models.patch
 usb-gadget-f_ncm-fix-ndp16-datagram-validation.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-use-rcu-to-avoid-use-after-free-on-the_.patch
 vsock-virtio-stop-workers-during-the-.remove.patch
 vsock-virtio-add-transport-parameter-to-the-virtio_t.patch