From: Sasha Levin Date: Wed, 20 Oct 2021 21:21:33 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.4.290~74 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2f14e5175a48f3ce4d3d0258c8c09d01c0e0187;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch b/queue-4.14/arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch new file mode 100644 index 00000000000..c742a59dd77 --- /dev/null +++ b/queue-4.14/arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch @@ -0,0 +1,37 @@ +From bfa5058a800eba268662d186a5d93887cc4e324c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 2 Sep 2021 15:13:58 +0300 +Subject: ARM: dts: at91: sama5d2_som1_ek: disable ISC node by default + +From: Eugen Hristev + +[ Upstream commit 4348cc10da6377a86940beb20ad357933b8f91bb ] + +Without a sensor node, the ISC will simply fail to probe, as the +corresponding port node is missing. +It is then logical to disable the node in the devicetree. +If we add a port with a connection to a sensor endpoint, ISC can be enabled. + +Signed-off-by: Eugen Hristev +Signed-off-by: Nicolas Ferre +Link: https://lore.kernel.org/r/20210902121358.503589-1-eugen.hristev@microchip.com +Signed-off-by: Sasha Levin +--- + arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +index 60cb084a8d92..7e1acec92b50 100644 +--- a/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts ++++ b/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +@@ -98,7 +98,6 @@ + isc: isc@f0008000 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>; +- status = "okay"; + }; + + spi0: spi@f8000000 { +-- +2.33.0 + diff --git a/queue-4.14/nfsd-keep-existing-listeners-on-portlist-error.patch b/queue-4.14/nfsd-keep-existing-listeners-on-portlist-error.patch new file mode 100644 index 00000000000..ddea06de0d6 --- /dev/null +++ b/queue-4.14/nfsd-keep-existing-listeners-on-portlist-error.patch @@ -0,0 +1,42 @@ +From c207fdf51b0fdb9a4d9c93eeef19aa4557d7de18 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Oct 2021 13:20:44 -0400 +Subject: NFSD: Keep existing listeners on portlist error + +From: Benjamin Coddington + +[ Upstream commit c20106944eb679fa3ab7e686fe5f6ba30fbc51e5 ] + +If nfsd has existing listening sockets without any processes, then an error +returned from svc_create_xprt() for an additional transport will remove +those existing listeners. We're seeing this in practice when userspace +attempts to create rpcrdma transports without having the rpcrdma modules +present before creating nfsd kernel processes. Fix this by checking for +existing sockets before calling nfsd_destroy(). + +Signed-off-by: Benjamin Coddington +Signed-off-by: Chuck Lever +Signed-off-by: Sasha Levin +--- + fs/nfsd/nfsctl.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c +index d44402241d9e..50465ee502c7 100644 +--- a/fs/nfsd/nfsctl.c ++++ b/fs/nfsd/nfsctl.c +@@ -788,7 +788,10 @@ out_close: + svc_xprt_put(xprt); + } + out_err: +- nfsd_destroy(net); ++ if (!list_empty(&nn->nfsd_serv->sv_permsocks)) ++ nn->nfsd_serv->sv_nrthreads--; ++ else ++ nfsd_destroy(net); + return err; + } + +-- +2.33.0 + diff --git a/queue-4.14/series b/queue-4.14/series index c94656cc31f..e42daac690c 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -1 +1,5 @@ btrfs-always-wait-on-ordered-extents-at-fsync-time.patch +arm-dts-at91-sama5d2_som1_ek-disable-isc-node-by-def.patch +xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch +xtensa-xtfpga-try-software-restart-before-simulating.patch +nfsd-keep-existing-listeners-on-portlist-error.patch diff --git a/queue-4.14/xtensa-xtfpga-try-software-restart-before-simulating.patch b/queue-4.14/xtensa-xtfpga-try-software-restart-before-simulating.patch new file mode 100644 index 00000000000..796b16cdf27 --- /dev/null +++ b/queue-4.14/xtensa-xtfpga-try-software-restart-before-simulating.patch @@ -0,0 +1,56 @@ +From 1477ba3b7863300ad65b64dc47bd2958e809da5b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sun, 1 Aug 2021 10:36:59 -0700 +Subject: xtensa: xtfpga: Try software restart before simulating CPU reset + +From: Guenter Roeck + +[ Upstream commit 012e974501a270d8dfd4ee2039e1fdf7579c907e ] + +Rebooting xtensa images loaded with the '-kernel' option in qemu does +not work. When executing a reboot command, the qemu session either hangs +or experiences an endless sequence of error messages. + + Kernel panic - not syncing: Unrecoverable error in exception handler + +Reset code jumps to the CPU restart address, but Linux can not recover +from there because code and data in the kernel init sections have been +discarded and overwritten at this point. + +XTFPGA platforms have a means to reset the CPU by writing 0xdead into a +specific FPGA IO address. When used in QEMU the kernel image loaded with +the '-kernel' option gets restored to its original state allowing the +machine to boot successfully. + +Use that mechanism to attempt a platform reset. If it does not work, +fall back to the existing mechanism. + +Signed-off-by: Guenter Roeck +Signed-off-by: Max Filippov +Signed-off-by: Sasha Levin +--- + arch/xtensa/platforms/xtfpga/setup.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c +index 982e7c22e7ca..db5122765f16 100644 +--- a/arch/xtensa/platforms/xtfpga/setup.c ++++ b/arch/xtensa/platforms/xtfpga/setup.c +@@ -54,8 +54,12 @@ void platform_power_off(void) + + void platform_restart(void) + { +- /* Flush and reset the mmu, simulate a processor reset, and +- * jump to the reset vector. */ ++ /* Try software reset first. */ ++ WRITE_ONCE(*(u32 *)XTFPGA_SWRST_VADDR, 0xdead); ++ ++ /* If software reset did not work, flush and reset the mmu, ++ * simulate a processor reset, and jump to the reset vector. ++ */ + cpu_reset(); + /* control never gets here */ + } +-- +2.33.0 + diff --git a/queue-4.14/xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch b/queue-4.14/xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch new file mode 100644 index 00000000000..30c04c326b4 --- /dev/null +++ b/queue-4.14/xtensa-xtfpga-use-config_use_of-instead-of-config_of.patch @@ -0,0 +1,41 @@ +From ff4ca758337ead0e8c47bc9160e921add4e9545c Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 5 Oct 2021 11:36:01 -0700 +Subject: xtensa: xtfpga: use CONFIG_USE_OF instead of CONFIG_OF + +From: Max Filippov + +[ Upstream commit f3d7c2cdf6dc0d5402ec29c3673893b3542c5ad1 ] + +Use platform data to initialize xtfpga device drivers when CONFIG_USE_OF +is not selected. This fixes xtfpga networking when CONFIG_USE_OF is not +selected but CONFIG_OF is. + +Signed-off-by: Max Filippov +Signed-off-by: Sasha Levin +--- + arch/xtensa/platforms/xtfpga/setup.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c +index 42285f35d313..982e7c22e7ca 100644 +--- a/arch/xtensa/platforms/xtfpga/setup.c ++++ b/arch/xtensa/platforms/xtfpga/setup.c +@@ -85,7 +85,7 @@ void __init platform_calibrate_ccount(void) + + #endif + +-#ifdef CONFIG_OF ++#ifdef CONFIG_USE_OF + + static void __init xtfpga_clk_setup(struct device_node *np) + { +@@ -303,4 +303,4 @@ static int __init xtavnet_init(void) + */ + arch_initcall(xtavnet_init); + +-#endif /* CONFIG_OF */ ++#endif /* CONFIG_USE_OF */ +-- +2.33.0 +