From: Sasha Levin Date: Sat, 23 Nov 2024 10:44:09 +0000 (-0500) Subject: Fixes for 4.19 X-Git-Tag: v4.19.325~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d8458bfcdcad671d4b4be68a2036eb4cbc45a79;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.19 Signed-off-by: Sasha Levin --- diff --git a/queue-4.19/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch b/queue-4.19/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch new file mode 100644 index 00000000000..0de962e8439 --- /dev/null +++ b/queue-4.19/asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch @@ -0,0 +1,53 @@ +From e6aabe429ea1cbcf119874db18d81329cf10fd2a Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2024 23:16:15 +0200 +Subject: ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet + +From: Hans de Goede + +[ Upstream commit 0107f28f135231da22a9ad5756bb16bd5cada4d5 ] + +The Vexia Edu Atla 10 tablet mostly uses the BYTCR tablet defaults, +but as happens on more models it is using IN1 instead of IN3 for +its internal mic and JD_SRC_JD2_IN4N instead of JD_SRC_JD1_IN4P +for jack-detection. + +Add a DMI quirk for this to fix the internal-mic and jack-detection. + +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241024211615.79518-2-hdegoede@redhat.com +Signed-off-by: Mark Brown +Signed-off-by: Sasha Levin +--- + sound/soc/intel/boards/bytcr_rt5640.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c +index 16e2ab2903754..2ed63866e9cc6 100644 +--- a/sound/soc/intel/boards/bytcr_rt5640.c ++++ b/sound/soc/intel/boards/bytcr_rt5640.c +@@ -879,6 +879,21 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { + BYT_RT5640_SSP0_AIF2 | + BYT_RT5640_MCLK_EN), + }, ++ { /* Vexia Edu Atla 10 tablet */ ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), ++ DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), ++ /* Above strings are too generic, also match on BIOS date */ ++ DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"), ++ }, ++ .driver_data = (void *)(BYT_RT5640_IN1_MAP | ++ BYT_RT5640_JD_SRC_JD2_IN4N | ++ BYT_RT5640_OVCD_TH_2000UA | ++ BYT_RT5640_OVCD_SF_0P75 | ++ BYT_RT5640_DIFF_MIC | ++ BYT_RT5640_SSP0_AIF2 | ++ BYT_RT5640_MCLK_EN), ++ }, + { /* Voyo Winpad A15 */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), +-- +2.43.0 + diff --git a/queue-4.19/mac80211-fix-user-power-when-emulating-chanctx.patch b/queue-4.19/mac80211-fix-user-power-when-emulating-chanctx.patch new file mode 100644 index 00000000000..5c1057c16dd --- /dev/null +++ b/queue-4.19/mac80211-fix-user-power-when-emulating-chanctx.patch @@ -0,0 +1,37 @@ +From b6b7b4c610965244b7a7d78dcb362d4e165d1c35 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 10 Oct 2024 13:39:54 -0700 +Subject: mac80211: fix user-power when emulating chanctx + +From: Ben Greear + +[ Upstream commit 9b15c6cf8d2e82c8427cd06f535d8de93b5b995c ] + +ieee80211_calc_hw_conf_chan was ignoring the configured +user_txpower. If it is set, use it to potentially decrease +txpower as requested. + +Signed-off-by: Ben Greear +Link: https://patch.msgid.link/20241010203954.1219686-1-greearb@candelatech.com +Signed-off-by: Johannes Berg +Signed-off-by: Sasha Levin +--- + net/mac80211/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/net/mac80211/main.c b/net/mac80211/main.c +index e8c4e9c0c5a09..71d10bdee4309 100644 +--- a/net/mac80211/main.c ++++ b/net/mac80211/main.c +@@ -140,6 +140,8 @@ static u32 ieee80211_hw_conf_chan(struct ieee80211_local *local) + } + + power = ieee80211_chandef_max_power(&chandef); ++ if (local->user_power_level != IEEE80211_UNSET_POWER_LEVEL) ++ power = min(local->user_power_level, power); + + rcu_read_lock(); + list_for_each_entry_rcu(sdata, &local->interfaces, list) { +-- +2.43.0 + diff --git a/queue-4.19/net-usb-qmi_wwan-add-quectel-rg650v.patch b/queue-4.19/net-usb-qmi_wwan-add-quectel-rg650v.patch new file mode 100644 index 00000000000..806b5599112 --- /dev/null +++ b/queue-4.19/net-usb-qmi_wwan-add-quectel-rg650v.patch @@ -0,0 +1,65 @@ +From 699f6308f58f7ed58ea38e237c2d619958362cb5 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2024 17:11:13 +0200 +Subject: net: usb: qmi_wwan: add Quectel RG650V +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Benoît Monin + +[ Upstream commit 6b3f18a76be6bbd237c7594cf0bf2912b68084fe ] + +Add support for Quectel RG650V which is based on Qualcomm SDX65 chip. +The composition is DIAG / NMEA / AT / AT / QMI. + +T: Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#= 4 Spd=5000 MxCh= 0 +D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 +P: Vendor=2c7c ProdID=0122 Rev=05.15 +S: Manufacturer=Quectel +S: Product=RG650V-EU +S: SerialNumber=xxxxxxx +C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA +I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=9ms +I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=9ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan +E: Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=9ms + +Signed-off-by: Benoît Monin +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/20241024151113.53203-1-benoit.monin@gmx.fr +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/usb/qmi_wwan.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c +index 57ccbc8a6c059..32b25462a573c 100644 +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1045,6 +1045,7 @@ static const struct usb_device_id products[] = { + USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7), + .driver_info = (unsigned long)&qmi_wwan_info, + }, ++ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0122)}, /* Quectel RG650V */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */ + {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ +-- +2.43.0 + diff --git a/queue-4.19/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch b/queue-4.19/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch new file mode 100644 index 00000000000..0374537eb17 --- /dev/null +++ b/queue-4.19/proc-softirqs-replace-seq_printf-with-seq_put_decima.patch @@ -0,0 +1,39 @@ +From 464e3b01744a8f744eabf031ab0a05594707b306 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 Nov 2024 10:12:28 +0800 +Subject: proc/softirqs: replace seq_printf with seq_put_decimal_ull_width + +From: David Wang <00107082@163.com> + +[ Upstream commit 84b9749a3a704dcc824a88aa8267247c801d51e4 ] + +seq_printf is costy, on a system with n CPUs, reading /proc/softirqs +would yield 10*n decimal values, and the extra cost parsing format string +grows linearly with number of cpus. Replace seq_printf with +seq_put_decimal_ull_width have significant performance improvement. +On an 8CPUs system, reading /proc/softirqs show ~40% performance +gain with this patch. + +Signed-off-by: David Wang <00107082@163.com> +Signed-off-by: Linus Torvalds +Signed-off-by: Sasha Levin +--- + fs/proc/softirqs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c +index 12901dcf57e2b..d8f4e7d54d002 100644 +--- a/fs/proc/softirqs.c ++++ b/fs/proc/softirqs.c +@@ -19,7 +19,7 @@ static int show_softirqs(struct seq_file *p, void *v) + for (i = 0; i < NR_SOFTIRQS; i++) { + seq_printf(p, "%12s:", softirq_to_name[i]); + for_each_possible_cpu(j) +- seq_printf(p, " %10u", kstat_softirqs_cpu(i, j)); ++ seq_put_decimal_ull_width(p, " ", kstat_softirqs_cpu(i, j), 10); + seq_putc(p, '\n'); + } + return 0; +-- +2.43.0 + diff --git a/queue-4.19/selftests-watchdog-test-fix-system-accidentally-rese.patch b/queue-4.19/selftests-watchdog-test-fix-system-accidentally-rese.patch new file mode 100644 index 00000000000..50a26aea5c1 --- /dev/null +++ b/queue-4.19/selftests-watchdog-test-fix-system-accidentally-rese.patch @@ -0,0 +1,58 @@ +From efa84877f0e961f9f2b5485d9ac1909b253df156 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 29 Oct 2024 11:13:24 +0800 +Subject: selftests/watchdog-test: Fix system accidentally reset after + watchdog-test + +From: Li Zhijian + +[ Upstream commit dc1308bee1ed03b4d698d77c8bd670d399dcd04d ] + +When running watchdog-test with 'make run_tests', the watchdog-test will +be terminated by a timeout signal(SIGTERM) due to the test timemout. + +And then, a system reboot would happen due to watchdog not stop. see +the dmesg as below: +``` +[ 1367.185172] watchdog: watchdog0: watchdog did not stop! +``` + +Fix it by registering more signals(including SIGTERM) in watchdog-test, +where its signal handler will stop the watchdog. + +After that + # timeout 1 ./watchdog-test + Watchdog Ticking Away! + . + Stopping watchdog ticks... + +Link: https://lore.kernel.org/all/20241029031324.482800-1-lizhijian@fujitsu.com/ +Signed-off-by: Li Zhijian +Reviewed-by: Shuah Khan +Signed-off-by: Shuah Khan +Signed-off-by: Sasha Levin +--- + tools/testing/selftests/watchdog/watchdog-test.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c +index f1c6e025cbe54..561bcc253fb3e 100644 +--- a/tools/testing/selftests/watchdog/watchdog-test.c ++++ b/tools/testing/selftests/watchdog/watchdog-test.c +@@ -152,7 +152,13 @@ int main(int argc, char *argv[]) + + printf("Watchdog Ticking Away!\n"); + ++ /* ++ * Register the signals ++ */ + signal(SIGINT, term); ++ signal(SIGTERM, term); ++ signal(SIGKILL, term); ++ signal(SIGQUIT, term); + + while (1) { + keep_alive(); +-- +2.43.0 + diff --git a/queue-4.19/series b/queue-4.19/series index 6130d11c9e0..bdb6f4fef5d 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -7,3 +7,9 @@ revert-mmc-dw_mmc-fix-idmac-operation-with-pages-bigger-than-4k.patch media-dvbdev-fix-the-logic-when-dvb_dynamic_minors-is-not-set.patch kbuild-use-uname-for-linux_compile_host-detection.patch mm-revert-mm-shmem-fix-data-race-in-shmem_getattr.patch +asoc-intel-bytcr_rt5640-add-dmi-quirk-for-vexia-edu-.patch +mac80211-fix-user-power-when-emulating-chanctx.patch +selftests-watchdog-test-fix-system-accidentally-rese.patch +x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch +net-usb-qmi_wwan-add-quectel-rg650v.patch +proc-softirqs-replace-seq_printf-with-seq_put_decima.patch diff --git a/queue-4.19/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch b/queue-4.19/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch new file mode 100644 index 00000000000..4ab63cfd049 --- /dev/null +++ b/queue-4.19/x86-amd_nb-fix-compile-testing-without-config_amd_nb.patch @@ -0,0 +1,53 @@ +From bd6ea44f1bd2a6411d01077736fcfed319ab2942 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 29 Oct 2024 09:23:20 +0000 +Subject: x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Arnd Bergmann + +[ Upstream commit fce9642c765a18abd1db0339a7d832c29b68456a ] + +node_to_amd_nb() is defined to NULL in non-AMD configs: + + drivers/platform/x86/amd/hsmp/plat.c: In function 'init_platform_device': + drivers/platform/x86/amd/hsmp/plat.c:165:68: error: dereferencing 'void *' pointer [-Werror] + 165 | sock->root = node_to_amd_nb(i)->root; + | ^~ + drivers/platform/x86/amd/hsmp/plat.c:165:68: error: request for member 'root' in something not a structure or union + +Users of the interface who also allow COMPILE_TEST will cause the above build +error so provide an inline stub to fix that. + + [ bp: Massage commit message. ] + +Signed-off-by: Arnd Bergmann +Signed-off-by: Borislav Petkov (AMD) +Reviewed-by: Ilpo Järvinen +Link: https://lore.kernel.org/r/20241029092329.3857004-1-arnd@kernel.org +Signed-off-by: Sasha Levin +--- + arch/x86/include/asm/amd_nb.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h +index fddb6d26239f5..7957ac2a643fd 100644 +--- a/arch/x86/include/asm/amd_nb.h ++++ b/arch/x86/include/asm/amd_nb.h +@@ -115,7 +115,10 @@ static inline bool amd_gart_present(void) + + #define amd_nb_num(x) 0 + #define amd_nb_has_feature(x) false +-#define node_to_amd_nb(x) NULL ++static inline struct amd_northbridge *node_to_amd_nb(int node) ++{ ++ return NULL; ++} + #define amd_gart_present(x) false + + #endif +-- +2.43.0 +