From: Sasha Levin Date: Sat, 4 Jan 2025 18:04:23 +0000 (-0500) Subject: Fixes for 5.4 X-Git-Tag: v5.4.289~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbe95b4f9a7c9627bbc31ca924f55590bbe67e93;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/arc-build-try-to-guess-gcc-variant-of-cross-compiler.patch b/queue-5.4/arc-build-try-to-guess-gcc-variant-of-cross-compiler.patch new file mode 100644 index 00000000000..3c065b38e3b --- /dev/null +++ b/queue-5.4/arc-build-try-to-guess-gcc-variant-of-cross-compiler.patch @@ -0,0 +1,50 @@ +From f1df217be26fa400066498027053797ac676f32b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 3 Dec 2024 14:37:15 +0200 +Subject: ARC: build: Try to guess GCC variant of cross compiler +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Leon Romanovsky + +[ Upstream commit 824927e88456331c7a999fdf5d9d27923b619590 ] + +ARC GCC compiler is packaged starting from Fedora 39i and the GCC +variant of cross compile tools has arc-linux-gnu- prefix and not +arc-linux-. This is causing that CROSS_COMPILE variable is left unset. + +This change allows builds without need to supply CROSS_COMPILE argument +if distro package is used. + +Before this change: +$ make -j 128 ARCH=arc W=1 drivers/infiniband/hw/mlx4/ + gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead + gcc: error: unrecognized command-line option ‘-mmedium-calls’ + gcc: error: unrecognized command-line option ‘-mlock’ + gcc: error: unrecognized command-line option ‘-munaligned-access’ + +[1] https://packages.fedoraproject.org/pkgs/cross-gcc/gcc-arc-linux-gnu/index.html +Signed-off-by: Leon Romanovsky +Signed-off-by: Vineet Gupta +Signed-off-by: Sasha Levin +--- + arch/arc/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arc/Makefile b/arch/arc/Makefile +index 6f05e509889f..d72d9f4dfc3d 100644 +--- a/arch/arc/Makefile ++++ b/arch/arc/Makefile +@@ -6,7 +6,7 @@ + KBUILD_DEFCONFIG := nsim_hs_defconfig + + ifeq ($(CROSS_COMPILE),) +-CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-) ++CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux- arc-linux-gnu-) + endif + + cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__ +-- +2.39.5 + diff --git a/queue-5.4/bpf-fix-potential-error-return.patch b/queue-5.4/bpf-fix-potential-error-return.patch new file mode 100644 index 00000000000..bfcc6f69c1e --- /dev/null +++ b/queue-5.4/bpf-fix-potential-error-return.patch @@ -0,0 +1,52 @@ +From fa7576bc4b48d1ad95dcb61eab64b3cd3436eaef Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 10 Dec 2024 11:42:45 +0000 +Subject: bpf: fix potential error return + +From: Anton Protopopov + +[ Upstream commit c4441ca86afe4814039ee1b32c39d833c1a16bbc ] + +The bpf_remove_insns() function returns WARN_ON_ONCE(error), where +error is a result of bpf_adj_branches(), and thus should be always 0 +However, if for any reason it is not 0, then it will be converted to +boolean by WARN_ON_ONCE and returned to user space as 1, not an actual +error value. Fix this by returning the original err after the WARN check. + +Signed-off-by: Anton Protopopov +Acked-by: Jiri Olsa +Acked-by: Andrii Nakryiko +Link: https://lore.kernel.org/r/20241210114245.836164-1-aspsk@isovalent.com +Signed-off-by: Alexei Starovoitov +Signed-off-by: Sasha Levin +--- + kernel/bpf/core.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c +index dde21d23f220..9fb103426cf0 100644 +--- a/kernel/bpf/core.c ++++ b/kernel/bpf/core.c +@@ -496,6 +496,8 @@ struct bpf_prog *bpf_patch_insn_single(struct bpf_prog *prog, u32 off, + + int bpf_remove_insns(struct bpf_prog *prog, u32 off, u32 cnt) + { ++ int err; ++ + /* Branch offsets can't overflow when program is shrinking, no need + * to call bpf_adj_branches(..., true) here + */ +@@ -503,7 +505,9 @@ int bpf_remove_insns(struct bpf_prog *prog, u32 off, u32 cnt) + sizeof(struct bpf_insn) * (prog->len - off - cnt)); + prog->len -= cnt; + +- return WARN_ON_ONCE(bpf_adj_branches(prog, off, off + cnt, off, false)); ++ err = bpf_adj_branches(prog, off, off + cnt, off, false); ++ WARN_ON_ONCE(err); ++ return err; + } + + static void bpf_prog_kallsyms_del_subprogs(struct bpf_prog *fp) +-- +2.39.5 + diff --git a/queue-5.4/irqchip-gic-correct-declaration-of-percpu_base-point.patch b/queue-5.4/irqchip-gic-correct-declaration-of-percpu_base-point.patch new file mode 100644 index 00000000000..2656ff7b769 --- /dev/null +++ b/queue-5.4/irqchip-gic-correct-declaration-of-percpu_base-point.patch @@ -0,0 +1,54 @@ +From bdb888c8f4a5c8775f52f140c87974f5714d1e3e Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 13 Dec 2024 15:57:53 +0100 +Subject: irqchip/gic: Correct declaration of *percpu_base pointer in union + gic_base + +From: Uros Bizjak + +[ Upstream commit a1855f1b7c33642c9f7a01991fb763342a312e9b ] + +percpu_base is used in various percpu functions that expect variable in +__percpu address space. Correct the declaration of percpu_base to + +void __iomem * __percpu *percpu_base; + +to declare the variable as __percpu pointer. + +The patch fixes several sparse warnings: + +irq-gic.c:1172:44: warning: incorrect type in assignment (different address spaces) +irq-gic.c:1172:44: expected void [noderef] __percpu *[noderef] __iomem *percpu_base +irq-gic.c:1172:44: got void [noderef] __iomem *[noderef] __percpu * +... +irq-gic.c:1231:43: warning: incorrect type in argument 1 (different address spaces) +irq-gic.c:1231:43: expected void [noderef] __percpu *__pdata +irq-gic.c:1231:43: got void [noderef] __percpu *[noderef] __iomem *percpu_base + +There were no changes in the resulting object files. + +Signed-off-by: Uros Bizjak +Signed-off-by: Thomas Gleixner +Acked-by: Marc Zyngier +Link: https://lore.kernel.org/all/20241213145809.2918-2-ubizjak@gmail.com +Signed-off-by: Sasha Levin +--- + drivers/irqchip/irq-gic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c +index 882204d1ef4f..5937f3cd288b 100644 +--- a/drivers/irqchip/irq-gic.c ++++ b/drivers/irqchip/irq-gic.c +@@ -62,7 +62,7 @@ static void gic_check_cpu_features(void) + + union gic_base { + void __iomem *common_base; +- void __percpu * __iomem *percpu_base; ++ void __iomem * __percpu *percpu_base; + }; + + struct gic_chip_data { +-- +2.39.5 + diff --git a/queue-5.4/net-usb-qmi_wwan-add-telit-fe910c04-compositions.patch b/queue-5.4/net-usb-qmi_wwan-add-telit-fe910c04-compositions.patch new file mode 100644 index 00000000000..ef2fd8498b2 --- /dev/null +++ b/queue-5.4/net-usb-qmi_wwan-add-telit-fe910c04-compositions.patch @@ -0,0 +1,109 @@ +From 183f92734b4c5183593807975989b43d04d678bb Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 9 Dec 2024 16:18:21 +0100 +Subject: net: usb: qmi_wwan: add Telit FE910C04 compositions + +From: Daniele Palmas + +[ Upstream commit 3b58b53a26598209a7ad8259a5114ce71f7c3d64 ] + +Add the following Telit FE910C04 compositions: + +0x10c0: rmnet + tty (AT/NMEA) + tty (AT) + tty (diag) +T: Bus=02 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#= 13 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10c0 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE910 +S: SerialNumber=f71b8b32 +C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +0x10c4: rmnet + tty (AT) + tty (AT) + tty (diag) +T: Bus=02 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#= 14 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10c4 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE910 +S: SerialNumber=f71b8b32 +C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +0x10c8: rmnet + tty (AT) + tty (diag) + DPL (data packet logging) + adb +T: Bus=02 Lev=01 Prnt=03 Port=06 Cnt=01 Dev#= 17 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=1bc7 ProdID=10c8 Rev=05.15 +S: Manufacturer=Telit Cinterion +S: Product=FE910 +S: SerialNumber=f71b8b32 +C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +Signed-off-by: Daniele Palmas +Link: https://patch.msgid.link/20241209151821.3688829-1-dnlplm@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Sasha Levin +--- + drivers/net/usb/qmi_wwan.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c +index af787088f1ae..347521ec52c3 100644 +--- a/drivers/net/usb/qmi_wwan.c ++++ b/drivers/net/usb/qmi_wwan.c +@@ -1328,6 +1328,9 @@ static const struct usb_device_id products[] = { + {QMI_QUIRK_SET_DTR(0x1bc7, 0x10a0, 0)}, /* Telit FN920C04 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x10a4, 0)}, /* Telit FN920C04 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x10a9, 0)}, /* Telit FN920C04 */ ++ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10c0, 0)}, /* Telit FE910C04 */ ++ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10c4, 0)}, /* Telit FE910C04 */ ++ {QMI_QUIRK_SET_DTR(0x1bc7, 0x10c8, 0)}, /* Telit FE910C04 */ + {QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */ + {QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */ + {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ +-- +2.39.5 + diff --git a/queue-5.4/series b/queue-5.4/series index bf789c74546..730b74d628f 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -77,3 +77,9 @@ alsa-usb-audio-us16x08-initialize-array-before-use.patch af_packet-fix-vlan_get_tci-vs-msg_peek.patch af_packet-fix-vlan_get_protocol_dgram-vs-msg_peek.patch ila-serialize-calls-to-nf_register_net_hooks.patch +wifi-mac80211-wake-the-queues-in-case-of-failure-in-.patch +sound-usb-format-don-t-warn-that-raw-dsd-is-unsuppor.patch +bpf-fix-potential-error-return.patch +net-usb-qmi_wwan-add-telit-fe910c04-compositions.patch +irqchip-gic-correct-declaration-of-percpu_base-point.patch +arc-build-try-to-guess-gcc-variant-of-cross-compiler.patch diff --git a/queue-5.4/sound-usb-format-don-t-warn-that-raw-dsd-is-unsuppor.patch b/queue-5.4/sound-usb-format-don-t-warn-that-raw-dsd-is-unsuppor.patch new file mode 100644 index 00000000000..348301b8908 --- /dev/null +++ b/queue-5.4/sound-usb-format-don-t-warn-that-raw-dsd-is-unsuppor.patch @@ -0,0 +1,75 @@ +From df75f93357d272e3c419d15e5fbbae483d78994b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 9 Dec 2024 11:05:29 +0200 +Subject: sound: usb: format: don't warn that raw DSD is unsupported + +From: Adrian Ratiu + +[ Upstream commit b50a3e98442b8d72f061617c7f7a71f7dba19484 ] + +UAC 2 & 3 DAC's set bit 31 of the format to signal support for a +RAW_DATA type, typically used for DSD playback. + +This is correctly tested by (format & UAC*_FORMAT_TYPE_I_RAW_DATA), +fp->dsd_raw = true; and call snd_usb_interface_dsd_format_quirks(), +however a confusing and unnecessary message gets printed because +the bit is not properly tested in the last "unsupported" if test: +if (format & ~0x3F) { ... } + +For example the output: + +usb 7-1: new high-speed USB device number 5 using xhci_hcd +usb 7-1: New USB device found, idVendor=262a, idProduct=9302, bcdDevice=0.01 +usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6 +usb 7-1: Product: TC44C +usb 7-1: Manufacturer: TC44C +usb 7-1: SerialNumber: 5000000001 +hid-generic 0003:262A:9302.001E: No inputs registered, leaving +hid-generic 0003:262A:9302.001E: hidraw6: USB HID v1.00 Device [DDHIFI TC44C] on usb-0000:08:00.3-1/input0 +usb 7-1: 2:4 : unsupported format bits 0x100000000 + +This last "unsupported format" is actually wrong: we know the +format is a RAW_DATA which we assume is DSD, so there is no need +to print the confusing message. + +This we unset bit 31 of the format after recognizing it, to avoid +the message. + +Suggested-by: Takashi Iwai +Signed-off-by: Adrian Ratiu +Link: https://patch.msgid.link/20241209090529.16134-2-adrian.ratiu@collabora.com +Signed-off-by: Takashi Iwai +Signed-off-by: Sasha Levin +--- + sound/usb/format.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/sound/usb/format.c b/sound/usb/format.c +index 11a4454c6f64..b29190042f30 100644 +--- a/sound/usb/format.c ++++ b/sound/usb/format.c +@@ -61,6 +61,8 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip, + pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL; + /* flag potentially raw DSD capable altsettings */ + fp->dsd_raw = true; ++ /* clear special format bit to avoid "unsupported format" msg below */ ++ format &= ~UAC2_FORMAT_TYPE_I_RAW_DATA; + } + + format <<= 1; +@@ -72,8 +74,11 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip, + sample_width = as->bBitResolution; + sample_bytes = as->bSubslotSize; + +- if (format & UAC3_FORMAT_TYPE_I_RAW_DATA) ++ if (format & UAC3_FORMAT_TYPE_I_RAW_DATA) { + pcm_formats |= SNDRV_PCM_FMTBIT_SPECIAL; ++ /* clear special format bit to avoid "unsupported format" msg below */ ++ format &= ~UAC3_FORMAT_TYPE_I_RAW_DATA; ++ } + + format <<= 1; + break; +-- +2.39.5 + diff --git a/queue-5.4/wifi-mac80211-wake-the-queues-in-case-of-failure-in-.patch b/queue-5.4/wifi-mac80211-wake-the-queues-in-case-of-failure-in-.patch new file mode 100644 index 00000000000..f4c8ac7c441 --- /dev/null +++ b/queue-5.4/wifi-mac80211-wake-the-queues-in-case-of-failure-in-.patch @@ -0,0 +1,44 @@ +From 9c517b3823af2d71c52e958eb2c6b9d077bc1e84 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 19 Nov 2024 17:35:39 +0200 +Subject: wifi: mac80211: wake the queues in case of failure in resume + +From: Emmanuel Grumbach + +[ Upstream commit 220bf000530f9b1114fa2a1022a871c7ce8a0b38 ] + +In case we fail to resume, we'll WARN with +"Hardware became unavailable during restart." and we'll wait until user +space does something. It'll typically bring the interface down and up to +recover. This won't work though because the queues are still stopped on +IEEE80211_QUEUE_STOP_REASON_SUSPEND reason. +Make sure we clear that reason so that we give a chance to the recovery +to succeed. + +Signed-off-by: Emmanuel Grumbach +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219447 +Signed-off-by: Miri Korenblit +Link: https://patch.msgid.link/20241119173108.cd628f560f97.I76a15fdb92de450e5329940125f3c58916be3942@changeid +Signed-off-by: Johannes Berg +Signed-off-by: Sasha Levin +--- + net/mac80211/util.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/net/mac80211/util.c b/net/mac80211/util.c +index 63b66fd0a1ce..515fe1d539b4 100644 +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c +@@ -2209,6 +2209,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) + WARN(1, "Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.\n"); + else + WARN(1, "Hardware became unavailable during restart.\n"); ++ ieee80211_wake_queues_by_reason(hw, IEEE80211_MAX_QUEUE_MAP, ++ IEEE80211_QUEUE_STOP_REASON_SUSPEND, ++ false); + ieee80211_handle_reconfig_failure(local); + return res; + } +-- +2.39.5 +