From: Greg Kroah-Hartman Date: Sun, 4 Oct 2020 10:39:27 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v4.19.150~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9113d9178a5ff8eee898356080d2e8d8d702e84b;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches 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 --- 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 index 00000000000..57d5ec7c7a0 --- /dev/null +++ b/queue-4.19/clk-socfpga-stratix10-fix-the-divider-for-the-emac_ptp_free_clk.patch @@ -0,0 +1,34 @@ +From b02cf0c4736c65c6667f396efaae6b5521e82abf Mon Sep 17 00:00:00 2001 +From: Dinh Nguyen +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 + +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 +Link: https://lore.kernel.org/r/20200831202657.8224-1-dinguyen@kernel.org +Signed-off-by: Stephen Boyd +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..889141adc12 --- /dev/null +++ b/queue-4.19/gpio-mockup-fix-resource-leak-in-error-path.patch @@ -0,0 +1,41 @@ +From 1b02d9e770cd7087f34c743f85ccf5ea8372b047 Mon Sep 17 00:00:00 2001 +From: Bartosz Golaszewski +Date: Tue, 8 Sep 2020 15:07:49 +0200 +Subject: gpio: mockup: fix resource leak in error path + +From: Bartosz Golaszewski + +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: +Signed-off-by: Bartosz Golaszewski +Reviewed-by: Andy Shevchenko +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..527f70a991a --- /dev/null +++ b/queue-4.19/gpio-tc35894-fix-up-tc35894-interrupt-configuration.patch @@ -0,0 +1,40 @@ +From 214b0e1ad01abf4c1f6d8d28fa096bf167e47cef Mon Sep 17 00:00:00 2001 +From: dillon min +Date: Thu, 3 Sep 2020 15:30:21 +0800 +Subject: gpio: tc35894: fix up tc35894 interrupt configuration + +From: dillon min + +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 +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Greg Kroah-Hartman + +--- + 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); + } + } + diff --git a/queue-4.19/series b/queue-4.19/series index d9a847dbfeb..7a4512c07ed 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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