From: Greg Kroah-Hartman Date: Sun, 22 Dec 2024 07:30:09 +0000 (+0100) Subject: 6.1-stable patches X-Git-Tag: v6.1.122~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f090cf6fb446a378b4049ee6c09f80545884ab5;p=thirdparty%2Fkernel%2Fstable-queue.git 6.1-stable patches added patches: chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch efivarfs-fix-error-on-non-existent-file.patch hexagon-disable-constant-extender-optimization-for-llvm-prior-to-19.1.0.patch i2c-riic-always-round-up-when-calculating-bus-period.patch kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch thunderbolt-improve-redrive-mode-handling.patch usb-serial-option-add-mediatek-t7xx-compositions.patch usb-serial-option-add-meig-smart-slm770a.patch usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch usb-serial-option-add-tcl-ik512-mbim-ecm.patch usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch --- diff --git a/queue-6.1/chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch b/queue-6.1/chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch new file mode 100644 index 00000000000..bb08f07ff78 --- /dev/null +++ b/queue-6.1/chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch @@ -0,0 +1,39 @@ +From fbbd84af6ba70334335bdeba3ae536cf751c14c6 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Fri, 13 Dec 2024 12:47:27 +0300 +Subject: chelsio/chtls: prevent potential integer overflow on 32bit + +From: Dan Carpenter + +commit fbbd84af6ba70334335bdeba3ae536cf751c14c6 upstream. + +The "gl->tot_len" variable is controlled by the user. It comes from +process_responses(). On 32bit systems, the "gl->tot_len + +sizeof(struct cpl_pass_accept_req) + sizeof(struct rss_header)" addition +could have an integer wrapping bug. Use size_add() to prevent this. + +Fixes: a08943947873 ("crypto: chtls - Register chtls with net tls") +Cc: stable@vger.kernel.org +Signed-off-by: Dan Carpenter +Reviewed-by: Simon Horman +Link: https://patch.msgid.link/c6bfb23c-2db2-4e1b-b8ab-ba3925c82ef5@stanley.mountain +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c ++++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c +@@ -346,8 +346,9 @@ static struct sk_buff *copy_gl_to_skb_pk + * driver. Once driver synthesizes cpl_pass_accpet_req the skb will go + * through the regular cpl_pass_accept_req processing in TOM. + */ +- skb = alloc_skb(gl->tot_len + sizeof(struct cpl_pass_accept_req) +- - pktshift, GFP_ATOMIC); ++ skb = alloc_skb(size_add(gl->tot_len, ++ sizeof(struct cpl_pass_accept_req)) - ++ pktshift, GFP_ATOMIC); + if (unlikely(!skb)) + return NULL; + __skb_put(skb, gl->tot_len + sizeof(struct cpl_pass_accept_req) diff --git a/queue-6.1/drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch b/queue-6.1/drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch new file mode 100644 index 00000000000..7c254af7f11 --- /dev/null +++ b/queue-6.1/drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch @@ -0,0 +1,58 @@ +From 9398332f23fab10c5ec57c168b44e72997d6318e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Fri, 29 Nov 2024 06:26:28 +0200 +Subject: drm/modes: Avoid divide by zero harder in drm_mode_vrefresh() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ville Syrjälä + +commit 9398332f23fab10c5ec57c168b44e72997d6318e upstream. + +drm_mode_vrefresh() is trying to avoid divide by zero +by checking whether htotal or vtotal are zero. But we may +still end up with a div-by-zero of vtotal*htotal*... + +Cc: stable@vger.kernel.org +Reported-by: syzbot+622bba18029bcde672e1@syzkaller.appspotmail.com +Closes: https://syzkaller.appspot.com/bug?extid=622bba18029bcde672e1 +Signed-off-by: Ville Syrjälä +Link: https://patchwork.freedesktop.org/patch/msgid/20241129042629.18280-2-ville.syrjala@linux.intel.com +Reviewed-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/drm_modes.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/drm_modes.c ++++ b/drivers/gpu/drm/drm_modes.c +@@ -808,14 +808,11 @@ EXPORT_SYMBOL(drm_mode_set_name); + */ + int drm_mode_vrefresh(const struct drm_display_mode *mode) + { +- unsigned int num, den; ++ unsigned int num = 1, den = 1; + + if (mode->htotal == 0 || mode->vtotal == 0) + return 0; + +- num = mode->clock; +- den = mode->htotal * mode->vtotal; +- + if (mode->flags & DRM_MODE_FLAG_INTERLACE) + num *= 2; + if (mode->flags & DRM_MODE_FLAG_DBLSCAN) +@@ -823,6 +820,12 @@ int drm_mode_vrefresh(const struct drm_d + if (mode->vscan > 1) + den *= mode->vscan; + ++ if (check_mul_overflow(mode->clock, num, &num)) ++ return 0; ++ ++ if (check_mul_overflow(mode->htotal * mode->vtotal, den, &den)) ++ return 0; ++ + return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den); + } + EXPORT_SYMBOL(drm_mode_vrefresh); diff --git a/queue-6.1/efivarfs-fix-error-on-non-existent-file.patch b/queue-6.1/efivarfs-fix-error-on-non-existent-file.patch new file mode 100644 index 00000000000..e779c9fbc34 --- /dev/null +++ b/queue-6.1/efivarfs-fix-error-on-non-existent-file.patch @@ -0,0 +1,64 @@ +From 2ab0837cb91b7de507daa145d17b3b6b2efb3abf Mon Sep 17 00:00:00 2001 +From: James Bottomley +Date: Sun, 8 Dec 2024 13:34:13 -0500 +Subject: efivarfs: Fix error on non-existent file + +From: James Bottomley + +commit 2ab0837cb91b7de507daa145d17b3b6b2efb3abf upstream. + +When looking up a non-existent file, efivarfs returns -EINVAL if the +file does not conform to the NAME-GUID format and -ENOENT if it does. +This is caused by efivars_d_hash() returning -EINVAL if the name is not +formatted correctly. This error is returned before simple_lookup() +returns a negative dentry, and is the error value that the user sees. + +Fix by removing this check. If the file does not exist, simple_lookup() +will return a negative dentry leading to -ENOENT and efivarfs_create() +already has a validity check before it creates an entry (and will +correctly return -EINVAL) + +Signed-off-by: James Bottomley +Cc: +[ardb: make efivarfs_valid_name() static] +Signed-off-by: Ard Biesheuvel +Signed-off-by: Greg Kroah-Hartman +--- + fs/efivarfs/inode.c | 2 +- + fs/efivarfs/internal.h | 1 - + fs/efivarfs/super.c | 3 --- + 3 files changed, 1 insertion(+), 5 deletions(-) + +--- a/fs/efivarfs/inode.c ++++ b/fs/efivarfs/inode.c +@@ -47,7 +47,7 @@ struct inode *efivarfs_get_inode(struct + * + * VariableName-12345678-1234-1234-1234-1234567891bc + */ +-bool efivarfs_valid_name(const char *str, int len) ++static bool efivarfs_valid_name(const char *str, int len) + { + const char *s = str + len - EFI_VARIABLE_GUID_LEN; + +--- a/fs/efivarfs/internal.h ++++ b/fs/efivarfs/internal.h +@@ -50,7 +50,6 @@ bool efivar_variable_is_removable(efi_gu + + extern const struct file_operations efivarfs_file_operations; + extern const struct inode_operations efivarfs_dir_inode_operations; +-extern bool efivarfs_valid_name(const char *str, int len); + extern struct inode *efivarfs_get_inode(struct super_block *sb, + const struct inode *dir, int mode, dev_t dev, + bool is_removable); +--- a/fs/efivarfs/super.c ++++ b/fs/efivarfs/super.c +@@ -64,9 +64,6 @@ static int efivarfs_d_hash(const struct + const unsigned char *s = qstr->name; + unsigned int len = qstr->len; + +- if (!efivarfs_valid_name(s, len)) +- return -EINVAL; +- + while (len-- > EFI_VARIABLE_GUID_LEN) + hash = partial_name_hash(*s++, hash); + diff --git a/queue-6.1/hexagon-disable-constant-extender-optimization-for-llvm-prior-to-19.1.0.patch b/queue-6.1/hexagon-disable-constant-extender-optimization-for-llvm-prior-to-19.1.0.patch new file mode 100644 index 00000000000..f4c059f953a --- /dev/null +++ b/queue-6.1/hexagon-disable-constant-extender-optimization-for-llvm-prior-to-19.1.0.patch @@ -0,0 +1,52 @@ +From aef25be35d23ec768eed08bfcf7ca3cf9685bc28 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Thu, 21 Nov 2024 11:22:18 -0700 +Subject: hexagon: Disable constant extender optimization for LLVM prior to 19.1.0 + +From: Nathan Chancellor + +commit aef25be35d23ec768eed08bfcf7ca3cf9685bc28 upstream. + +The Hexagon-specific constant extender optimization in LLVM may crash on +Linux kernel code [1], such as fs/bcache/btree_io.c after +commit 32ed4a620c54 ("bcachefs: Btree path tracepoints") in 6.12: + + clang: llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp:745: bool (anonymous namespace)::HexagonConstExtenders::ExtRoot::operator<(const HCE::ExtRoot &) const: Assertion `ThisB->getParent() == OtherB->getParent()' failed. + Stack dump: + 0. Program arguments: clang --target=hexagon-linux-musl ... fs/bcachefs/btree_io.c + 1. parser at end of file + 2. Code generation + 3. Running pass 'Function Pass Manager' on module 'fs/bcachefs/btree_io.c'. + 4. Running pass 'Hexagon constant-extender optimization' on function '@__btree_node_lock_nopath' + +Without assertions enabled, there is just a hang during compilation. + +This has been resolved in LLVM main (20.0.0) [2] and backported to LLVM +19.1.0 but the kernel supports LLVM 13.0.1 and newer, so disable the +constant expander optimization using the '-mllvm' option when using a +toolchain that is not fixed. + +Cc: stable@vger.kernel.org +Link: https://github.com/llvm/llvm-project/issues/99714 [1] +Link: https://github.com/llvm/llvm-project/commit/68df06a0b2998765cb0a41353fcf0919bbf57ddb [2] +Link: https://github.com/llvm/llvm-project/commit/2ab8d93061581edad3501561722ebd5632d73892 [3] +Reviewed-by: Brian Cain +Signed-off-by: Nathan Chancellor +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + arch/hexagon/Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/arch/hexagon/Makefile ++++ b/arch/hexagon/Makefile +@@ -32,3 +32,9 @@ KBUILD_LDFLAGS += $(ldflags-y) + TIR_NAME := r19 + KBUILD_CFLAGS += -ffixed-$(TIR_NAME) -DTHREADINFO_REG=$(TIR_NAME) -D__linux__ + KBUILD_AFLAGS += -DTHREADINFO_REG=$(TIR_NAME) ++ ++# Disable HexagonConstExtenders pass for LLVM versions prior to 19.1.0 ++# https://github.com/llvm/llvm-project/issues/99714 ++ifneq ($(call clang-min-version, 190100),y) ++KBUILD_CFLAGS += -mllvm -hexagon-cext=false ++endif diff --git a/queue-6.1/i2c-riic-always-round-up-when-calculating-bus-period.patch b/queue-6.1/i2c-riic-always-round-up-when-calculating-bus-period.patch new file mode 100644 index 00000000000..c1661880183 --- /dev/null +++ b/queue-6.1/i2c-riic-always-round-up-when-calculating-bus-period.patch @@ -0,0 +1,47 @@ +From de6b43798d9043a7c749a0428dbb02d5fff156e5 Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Fri, 22 Nov 2024 15:14:35 +0100 +Subject: i2c: riic: Always round-up when calculating bus period + +From: Geert Uytterhoeven + +commit de6b43798d9043a7c749a0428dbb02d5fff156e5 upstream. + +Currently, the RIIC driver may run the I2C bus faster than requested, +which may cause subtle failures. E.g. Biju reported a measured bus +speed of 450 kHz instead of the expected maximum of 400 kHz on RZ/G2L. + +The initial calculation of the bus period uses DIV_ROUND_UP(), to make +sure the actual bus speed never becomes faster than the requested bus +speed. However, the subsequent division-by-two steps do not use +round-up, which may lead to a too-small period, hence a too-fast and +possible out-of-spec bus speed. E.g. on RZ/Five, requesting a bus speed +of 100 resp. 400 kHz will yield too-fast target bus speeds of 100806 +resp. 403226 Hz instead of 97656 resp. 390625 Hz. + +Fix this by using DIV_ROUND_UP() in the subsequent divisions, too. + +Tested on RZ/A1H, RZ/A2M, and RZ/Five. + +Fixes: d982d66514192cdb ("i2c: riic: remove clock and frequency restrictions") +Reported-by: Biju Das +Signed-off-by: Geert Uytterhoeven +Cc: # v4.15+ +Link: https://lore.kernel.org/r/c59aea77998dfea1b4456c4b33b55ab216fcbf5e.1732284746.git.geert+renesas@glider.be +Signed-off-by: Andi Shyti +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-riic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-riic.c ++++ b/drivers/i2c/busses/i2c-riic.c +@@ -325,7 +325,7 @@ static int riic_init_hw(struct riic_dev + if (brl <= (0x1F + 3)) + break; + +- total_ticks /= 2; ++ total_ticks = DIV_ROUND_UP(total_ticks, 2); + rate /= 2; + } + diff --git a/queue-6.1/kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch b/queue-6.1/kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch new file mode 100644 index 00000000000..a82c99634c2 --- /dev/null +++ b/queue-6.1/kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch @@ -0,0 +1,161 @@ +From 1201f226c863b7da739f7420ddba818cedf372fc Mon Sep 17 00:00:00 2001 +From: Sean Christopherson +Date: Tue, 10 Dec 2024 17:32:58 -0800 +Subject: KVM: x86: Cache CPUID.0xD XSTATE offsets+sizes during module init + +From: Sean Christopherson + +commit 1201f226c863b7da739f7420ddba818cedf372fc upstream. + +Snapshot the output of CPUID.0xD.[1..n] during kvm.ko initiliaization to +avoid the overead of CPUID during runtime. The offset, size, and metadata +for CPUID.0xD.[1..n] sub-leaves does not depend on XCR0 or XSS values, i.e. +is constant for a given CPU, and thus can be cached during module load. + +On Intel's Emerald Rapids, CPUID is *wildly* expensive, to the point where +recomputing XSAVE offsets and sizes results in a 4x increase in latency of +nested VM-Enter and VM-Exit (nested transitions can trigger +xstate_required_size() multiple times per transition), relative to using +cached values. The issue is easily visible by running `perf top` while +triggering nested transitions: kvm_update_cpuid_runtime() shows up at a +whopping 50%. + +As measured via RDTSC from L2 (using KVM-Unit-Test's CPUID VM-Exit test +and a slightly modified L1 KVM to handle CPUID in the fastpath), a nested +roundtrip to emulate CPUID on Skylake (SKX), Icelake (ICX), and Emerald +Rapids (EMR) takes: + + SKX 11650 + ICX 22350 + EMR 28850 + +Using cached values, the latency drops to: + + SKX 6850 + ICX 9000 + EMR 7900 + +The underlying issue is that CPUID itself is slow on ICX, and comically +slow on EMR. The problem is exacerbated on CPUs which support XSAVES +and/or XSAVEC, as KVM invokes xstate_required_size() twice on each +runtime CPUID update, and because there are more supported XSAVE features +(CPUID for supported XSAVE feature sub-leafs is significantly slower). + + SKX: + CPUID.0xD.2 = 348 cycles + CPUID.0xD.3 = 400 cycles + CPUID.0xD.4 = 276 cycles + CPUID.0xD.5 = 236 cycles + + + EMR: + CPUID.0xD.2 = 1138 cycles + CPUID.0xD.3 = 1362 cycles + CPUID.0xD.4 = 1068 cycles + CPUID.0xD.5 = 910 cycles + CPUID.0xD.6 = 914 cycles + CPUID.0xD.7 = 1350 cycles + CPUID.0xD.8 = 734 cycles + CPUID.0xD.9 = 766 cycles + CPUID.0xD.10 = 732 cycles + CPUID.0xD.11 = 718 cycles + CPUID.0xD.12 = 734 cycles + CPUID.0xD.13 = 1700 cycles + CPUID.0xD.14 = 1126 cycles + CPUID.0xD.15 = 898 cycles + CPUID.0xD.16 = 716 cycles + CPUID.0xD.17 = 748 cycles + CPUID.0xD.18 = 776 cycles + +Note, updating runtime CPUID information multiple times per nested +transition is itself a flaw, especially since CPUID is a mandotory +intercept on both Intel and AMD. E.g. KVM doesn't need to ensure emulated +CPUID state is up-to-date while running L2. That flaw will be fixed in a +future patch, as deferring runtime CPUID updates is more subtle than it +appears at first glance, the benefits aren't super critical to have once +the XSAVE issue is resolved, and caching CPUID output is desirable even if +KVM's updates are deferred. + +Cc: Jim Mattson +Cc: stable@vger.kernel.org +Signed-off-by: Sean Christopherson +Message-ID: <20241211013302.1347853-2-seanjc@google.com> +Signed-off-by: Paolo Bonzini +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/kvm/cpuid.c | 31 ++++++++++++++++++++++++++----- + arch/x86/kvm/cpuid.h | 1 + + arch/x86/kvm/x86.c | 2 ++ + 3 files changed, 29 insertions(+), 5 deletions(-) + +--- a/arch/x86/kvm/cpuid.c ++++ b/arch/x86/kvm/cpuid.c +@@ -33,6 +33,26 @@ + u32 kvm_cpu_caps[NR_KVM_CPU_CAPS] __read_mostly; + EXPORT_SYMBOL_GPL(kvm_cpu_caps); + ++struct cpuid_xstate_sizes { ++ u32 eax; ++ u32 ebx; ++ u32 ecx; ++}; ++ ++static struct cpuid_xstate_sizes xstate_sizes[XFEATURE_MAX] __ro_after_init; ++ ++void __init kvm_init_xstate_sizes(void) ++{ ++ u32 ign; ++ int i; ++ ++ for (i = XFEATURE_YMM; i < ARRAY_SIZE(xstate_sizes); i++) { ++ struct cpuid_xstate_sizes *xs = &xstate_sizes[i]; ++ ++ cpuid_count(0xD, i, &xs->eax, &xs->ebx, &xs->ecx, &ign); ++ } ++} ++ + u32 xstate_required_size(u64 xstate_bv, bool compacted) + { + int feature_bit = 0; +@@ -41,14 +61,15 @@ u32 xstate_required_size(u64 xstate_bv, + xstate_bv &= XFEATURE_MASK_EXTEND; + while (xstate_bv) { + if (xstate_bv & 0x1) { +- u32 eax, ebx, ecx, edx, offset; +- cpuid_count(0xD, feature_bit, &eax, &ebx, &ecx, &edx); ++ struct cpuid_xstate_sizes *xs = &xstate_sizes[feature_bit]; ++ u32 offset; ++ + /* ECX[1]: 64B alignment in compacted form */ + if (compacted) +- offset = (ecx & 0x2) ? ALIGN(ret, 64) : ret; ++ offset = (xs->ecx & 0x2) ? ALIGN(ret, 64) : ret; + else +- offset = ebx; +- ret = max(ret, offset + eax); ++ offset = xs->ebx; ++ ret = max(ret, offset + xs->eax); + } + + xstate_bv >>= 1; +--- a/arch/x86/kvm/cpuid.h ++++ b/arch/x86/kvm/cpuid.h +@@ -32,6 +32,7 @@ int kvm_vcpu_ioctl_get_cpuid2(struct kvm + bool kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, + u32 *ecx, u32 *edx, bool exact_only); + ++void __init kvm_init_xstate_sizes(void); + u32 xstate_required_size(u64 xstate_bv, bool compacted); + + int cpuid_query_maxphyaddr(struct kvm_vcpu *vcpu); +--- a/arch/x86/kvm/x86.c ++++ b/arch/x86/kvm/x86.c +@@ -13820,6 +13820,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(kvm_vmgexit + + static int __init kvm_x86_init(void) + { ++ kvm_init_xstate_sizes(); ++ + kvm_mmu_x86_module_init(); + mitigate_smt_rsb &= boot_cpu_has_bug(X86_BUG_SMT_RSB) && cpu_smt_possible(); + return 0; diff --git a/queue-6.1/mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch b/queue-6.1/mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch new file mode 100644 index 00000000000..4c655e7ba23 --- /dev/null +++ b/queue-6.1/mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch @@ -0,0 +1,35 @@ +From a56335c85b592cb2833db0a71f7112b7d9f0d56b Mon Sep 17 00:00:00 2001 +From: Prathamesh Shete +Date: Mon, 9 Dec 2024 15:40:09 +0530 +Subject: mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk + +From: Prathamesh Shete + +commit a56335c85b592cb2833db0a71f7112b7d9f0d56b upstream. + +Value 0 in ADMA length descriptor is interpreted as 65536 on new Tegra +chips, remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk to make sure max +ADMA2 length is 65536. + +Fixes: 4346b7c7941d ("mmc: tegra: Add Tegra186 support") +Cc: stable@vger.kernel.org +Signed-off-by: Prathamesh Shete +Acked-by: Thierry Reding +Acked-by: Adrian Hunter +Message-ID: <20241209101009.22710-1-pshete@nvidia.com> +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/sdhci-tegra.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/mmc/host/sdhci-tegra.c ++++ b/drivers/mmc/host/sdhci-tegra.c +@@ -1520,7 +1520,6 @@ static const struct sdhci_pltfm_data sdh + .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | + SDHCI_QUIRK_SINGLE_POWER_WRITE | + SDHCI_QUIRK_NO_HISPD_BIT | +- SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC | + SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_ISSUE_CMD_DAT_RESET_TOGETHER, diff --git a/queue-6.1/series b/queue-6.1/series index 76b3ce0f037..0501d4e628e 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -29,3 +29,16 @@ net-hinic-fix-cleanup-in-create_rxqs-txqs.patch net-ethernet-bgmac-platform-fix-an-of-node-reference.patch netfilter-ipset-fix-for-recursive-locking-warning.patch net-mdiobus-fix-an-of-node-reference-leak.patch +mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch +kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch +chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch +i2c-riic-always-round-up-when-calculating-bus-period.patch +efivarfs-fix-error-on-non-existent-file.patch +hexagon-disable-constant-extender-optimization-for-llvm-prior-to-19.1.0.patch +usb-serial-option-add-tcl-ik512-mbim-ecm.patch +usb-serial-option-add-meig-smart-slm770a.patch +usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch +usb-serial-option-add-mediatek-t7xx-compositions.patch +usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch +thunderbolt-improve-redrive-mode-handling.patch +drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch diff --git a/queue-6.1/thunderbolt-improve-redrive-mode-handling.patch b/queue-6.1/thunderbolt-improve-redrive-mode-handling.patch new file mode 100644 index 00000000000..3e9dd8d9478 --- /dev/null +++ b/queue-6.1/thunderbolt-improve-redrive-mode-handling.patch @@ -0,0 +1,124 @@ +From 24740385cb0d6d22ab7fa7adf36546d5b3cdcf73 Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Fri, 15 Nov 2024 11:54:40 +0200 +Subject: thunderbolt: Improve redrive mode handling + +From: Mika Westerberg + +commit 24740385cb0d6d22ab7fa7adf36546d5b3cdcf73 upstream. + +When USB-C monitor is connected directly to Intel Barlow Ridge host, it +goes into "redrive" mode that basically routes the DisplayPort signals +directly from the GPU to the USB-C monitor without any tunneling needed. +However, the host router must be powered on for this to work. Aaron +reported that there are a couple of cases where this will not work with +the current code: + + - Booting with USB-C monitor plugged in. + - Plugging in USB-C monitor when the host router is in sleep state + (runtime suspended). + - Plugging in USB-C device while the system is in system sleep state. + +In all these cases once the host router is runtime suspended the picture +on the connected USB-C display disappears too. This is certainly not +what the user expected. + +For this reason improve the redrive mode handling to keep the host +router from runtime suspending when detect that any of the above cases +is happening. + +Fixes: a75e0684efe5 ("thunderbolt: Keep the domain powered when USB4 port is in redrive mode") +Reported-by: Aaron Rainbolt +Closes: https://lore.kernel.org/linux-usb/20241009220118.70bfedd0@kf-ir16/ +Cc: stable@vger.kernel.org +Signed-off-by: Mika Westerberg +Signed-off-by: Greg Kroah-Hartman +--- + drivers/thunderbolt/tb.c | 41 +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + +--- a/drivers/thunderbolt/tb.c ++++ b/drivers/thunderbolt/tb.c +@@ -1093,6 +1093,37 @@ static void tb_exit_redrive(struct tb_po + } + } + ++static void tb_switch_enter_redrive(struct tb_switch *sw) ++{ ++ struct tb_port *port; ++ ++ tb_switch_for_each_port(sw, port) ++ tb_enter_redrive(port); ++} ++ ++/* ++ * Called during system and runtime suspend to forcefully exit redrive ++ * mode without querying whether the resource is available. ++ */ ++static void tb_switch_exit_redrive(struct tb_switch *sw) ++{ ++ struct tb_port *port; ++ ++ if (!(sw->quirks & QUIRK_KEEP_POWER_IN_DP_REDRIVE)) ++ return; ++ ++ tb_switch_for_each_port(sw, port) { ++ if (!tb_port_is_dpin(port)) ++ continue; ++ ++ if (port->redrive) { ++ port->redrive = false; ++ pm_runtime_put(&sw->dev); ++ tb_port_dbg(port, "exit redrive mode\n"); ++ } ++ } ++} ++ + static void tb_dp_resource_unavailable(struct tb *tb, struct tb_port *port) + { + struct tb_port *in, *out; +@@ -1548,6 +1579,7 @@ static int tb_start(struct tb *tb) + tb_create_usb3_tunnels(tb->root_switch); + /* Add DP IN resources for the root switch */ + tb_add_dp_resources(tb->root_switch); ++ tb_switch_enter_redrive(tb->root_switch); + /* Make the discovered switches available to the userspace */ + device_for_each_child(&tb->root_switch->dev, NULL, + tb_scan_finalize_switch); +@@ -1563,6 +1595,7 @@ static int tb_suspend_noirq(struct tb *t + + tb_dbg(tb, "suspending...\n"); + tb_disconnect_and_release_dp(tb); ++ tb_switch_exit_redrive(tb->root_switch); + tb_switch_suspend(tb->root_switch, false); + tcm->hotplug_active = false; /* signal tb_handle_hotplug to quit */ + tb_dbg(tb, "suspend finished\n"); +@@ -1665,6 +1698,7 @@ static int tb_resume_noirq(struct tb *tb + tb_dbg(tb, "tunnels restarted, sleeping for 100ms\n"); + msleep(100); + } ++ tb_switch_enter_redrive(tb->root_switch); + /* Allow tb_handle_hotplug to progress events */ + tcm->hotplug_active = true; + tb_dbg(tb, "resume finished\n"); +@@ -1728,6 +1762,12 @@ static int tb_runtime_suspend(struct tb + struct tb_cm *tcm = tb_priv(tb); + + mutex_lock(&tb->lock); ++ /* ++ * The below call only releases DP resources to allow exiting and ++ * re-entering redrive mode. ++ */ ++ tb_disconnect_and_release_dp(tb); ++ tb_switch_exit_redrive(tb->root_switch); + tb_switch_suspend(tb->root_switch, true); + tcm->hotplug_active = false; + mutex_unlock(&tb->lock); +@@ -1759,6 +1799,7 @@ static int tb_runtime_resume(struct tb * + tb_restore_children(tb->root_switch); + list_for_each_entry_safe(tunnel, n, &tcm->tunnel_list, list) + tb_tunnel_restart(tunnel); ++ tb_switch_enter_redrive(tb->root_switch); + tcm->hotplug_active = true; + mutex_unlock(&tb->lock); + diff --git a/queue-6.1/usb-serial-option-add-mediatek-t7xx-compositions.patch b/queue-6.1/usb-serial-option-add-mediatek-t7xx-compositions.patch new file mode 100644 index 00000000000..792fb06f382 --- /dev/null +++ b/queue-6.1/usb-serial-option-add-mediatek-t7xx-compositions.patch @@ -0,0 +1,89 @@ +From f07dfa6a1b65034a5c3ba3a555950d972f252757 Mon Sep 17 00:00:00 2001 +From: Jack Wu +Date: Thu, 28 Nov 2024 10:22:27 +0800 +Subject: USB: serial: option: add MediaTek T7XX compositions + +From: Jack Wu + +commit f07dfa6a1b65034a5c3ba3a555950d972f252757 upstream. + +Add the MediaTek T7XX compositions: + +T: Bus=03 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 74 Spd=480 MxCh= 0 +D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=0e8d ProdID=7129 Rev= 0.01 +S: Manufacturer=MediaTek Inc. +S: Product=USB DATA CARD +S: SerialNumber=004402459035402 +C:* #Ifs=10 Cfg#= 1 Atr=a0 MxPwr=500mA +A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 +I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim +E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +------------------------------- +| If Number | Function | +------------------------------- +| 2 | USB AP Log Port | +------------------------------- +| 3 | USB AP GNSS Port| +------------------------------- +| 4 | USB AP META Port| +------------------------------- +| 5 | ADB port | +------------------------------- +| 6 | USB MD AT Port | +------------------------------ +| 7 | USB MD META Port| +------------------------------- +| 8 | USB NTZ Port | +------------------------------- +| 9 | USB Debug port | +------------------------------- + +Signed-off-by: Jack Wu +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -2249,6 +2249,8 @@ static const struct usb_device_id option + .driver_info = NCTRL(2) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x7127, 0xff, 0x00, 0x00), + .driver_info = NCTRL(2) | NCTRL(3) | NCTRL(4) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, 0x7129, 0xff, 0x00, 0x00), /* MediaTek T7XX */ ++ .driver_info = NCTRL(2) | NCTRL(3) | NCTRL(4) }, + { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, + { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MPL200), + .driver_info = RSVD(1) | RSVD(4) }, diff --git a/queue-6.1/usb-serial-option-add-meig-smart-slm770a.patch b/queue-6.1/usb-serial-option-add-meig-smart-slm770a.patch new file mode 100644 index 00000000000..dff81e08e12 --- /dev/null +++ b/queue-6.1/usb-serial-option-add-meig-smart-slm770a.patch @@ -0,0 +1,71 @@ +From 724d461e44dfc0815624d2a9792f2f2beb7ee46d Mon Sep 17 00:00:00 2001 +From: Michal Hrusecky +Date: Tue, 19 Nov 2024 14:00:18 +0100 +Subject: USB: serial: option: add MeiG Smart SLM770A + +From: Michal Hrusecky + +commit 724d461e44dfc0815624d2a9792f2f2beb7ee46d upstream. + +Update the USB serial option driver to support MeiG Smart SLM770A. + +ID 2dee:4d57 Marvell Mobile Composite Device Bus + +T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 +P: Vendor=2dee ProdID=4d57 Rev= 1.00 +S: Manufacturer=Marvell +S: Product=Mobile Composite Device Bus +C:* #Ifs= 6 Cfg#= 1 Atr=c0 MxPwr=500mA +A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03 +I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host +E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=0e(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +Tested successfully connecting to the Internet via rndis interface after +dialing via AT commands on If#=3 or If#=4. +Not sure of the purpose of the other serial interfaces. + +Signed-off-by: Michal Hrusecky +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -625,6 +625,8 @@ static void option_instat_callback(struc + #define MEIGSMART_PRODUCT_SRM825L 0x4d22 + /* MeiG Smart SLM320 based on UNISOC UIS8910 */ + #define MEIGSMART_PRODUCT_SLM320 0x4d41 ++/* MeiG Smart SLM770A based on ASR1803 */ ++#define MEIGSMART_PRODUCT_SLM770A 0x4d57 + + /* Device flags */ + +@@ -2382,6 +2384,7 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM770A, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) }, diff --git a/queue-6.1/usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch b/queue-6.1/usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch new file mode 100644 index 00000000000..8d6dc74a9b4 --- /dev/null +++ b/queue-6.1/usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch @@ -0,0 +1,83 @@ +From aa954ae08262bb5cd6ab18dd56a0b58c1315db8b Mon Sep 17 00:00:00 2001 +From: Mank Wang +Date: Fri, 22 Nov 2024 09:06:00 +0000 +Subject: USB: serial: option: add Netprisma LCUK54 modules for WWAN Ready + +From: Mank Wang + +commit aa954ae08262bb5cd6ab18dd56a0b58c1315db8b upstream. + +LCUK54-WRD's pid/vid +0x3731/0x010a +0x3731/0x010c + +LCUK54-WWD's pid/vid +0x3731/0x010b +0x3731/0x010d + +Above products use the exact same interface layout and option +driver: +MBIM + GNSS + DIAG + NMEA + AT + QDSS + DPL + +T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 5 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=3731 ProdID=0101 Rev= 5.04 +S: Manufacturer=NetPrisma +S: Product=LCUK54-WRD +S: SerialNumber=feeba631 +C:* #Ifs= 8 Cfg#= 1 Atr=a0 MxPwr=500mA +A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00 +I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim +E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) +E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=32ms +I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option +E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=70 Driver=(none) +E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +I:* If#= 7 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none) +E: Ad=8f(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +Signed-off-by: Mank Wang +[ johan: use lower case hex notation ] +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -2377,6 +2377,18 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for Golbal EDU */ + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0x00, 0x40) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x0116, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010a, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WRD for WWAN Ready */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010a, 0xff, 0x00, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010a, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010b, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for WWAN Ready */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010b, 0xff, 0x00, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010b, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010c, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WRD for WWAN Ready */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010c, 0xff, 0x00, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010c, 0xff, 0xff, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010d, 0xff, 0xff, 0x30) }, /* NetPrisma LCUK54-WWD for WWAN Ready */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010d, 0xff, 0x00, 0x40) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(0x3731, 0x010d, 0xff, 0xff, 0x40) }, + { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) }, diff --git a/queue-6.1/usb-serial-option-add-tcl-ik512-mbim-ecm.patch b/queue-6.1/usb-serial-option-add-tcl-ik512-mbim-ecm.patch new file mode 100644 index 00000000000..4ab6fac7ccd --- /dev/null +++ b/queue-6.1/usb-serial-option-add-tcl-ik512-mbim-ecm.patch @@ -0,0 +1,82 @@ +From fdad4fb7c506bea8b419f70ff2163d99962e8ede Mon Sep 17 00:00:00 2001 +From: Daniel Swanemar +Date: Mon, 4 Nov 2024 14:42:17 +0100 +Subject: USB: serial: option: add TCL IK512 MBIM & ECM + +From: Daniel Swanemar + +commit fdad4fb7c506bea8b419f70ff2163d99962e8ede upstream. + +Add the following TCL IK512 compositions: + +0x0530: Modem + Diag + AT + MBIM +T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=10000 MxCh= 0 +D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 +P: Vendor=1bbb ProdID=0530 Rev=05.04 +S: Manufacturer=TCL +S: Product=TCL 5G USB Dongle +S: SerialNumber=3136b91a +C: #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=896mA +I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=82(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option +E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms +I: If#= 3 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim +E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=32ms +I: If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim +E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms + +0x0640: ECM + Modem + Diag + AT +T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=10000 MxCh= 0 +D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 +P: Vendor=1bbb ProdID=0640 Rev=05.04 +S: Manufacturer=TCL +S: Product=TCL 5G USB Dongle +S: SerialNumber=3136b91a +C: #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=896mA +I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether +E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=32ms +I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether +E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=83(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=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms +E: Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms +I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option +E: Ad=03(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=32ms + +Signed-off-by: Daniel Swanemar +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -2385,6 +2385,10 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) }, ++ { USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */ ++ .driver_info = NCTRL(1) }, ++ { USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */ ++ .driver_info = NCTRL(3) }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(usb, option_ids); diff --git a/queue-6.1/usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch b/queue-6.1/usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch new file mode 100644 index 00000000000..7faa98cdac2 --- /dev/null +++ b/queue-6.1/usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch @@ -0,0 +1,107 @@ +From 8366e64a4454481339e7c56a8ad280161f2e441d Mon Sep 17 00:00:00 2001 +From: Daniele Palmas +Date: Mon, 9 Dec 2024 16:32:54 +0100 +Subject: USB: serial: option: add Telit FE910C04 rmnet compositions + +From: Daniele Palmas + +commit 8366e64a4454481339e7c56a8ad280161f2e441d upstream. + +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 +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1397,6 +1397,12 @@ static const struct usb_device_id option + .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10aa, 0xff), /* Telit FN920C04 (MBIM) */ + .driver_info = NCTRL(3) | RSVD(4) | RSVD(5) }, ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c0, 0xff), /* Telit FE910C04 (rmnet) */ ++ .driver_info = RSVD(0) | NCTRL(3) }, ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c4, 0xff), /* Telit FE910C04 (rmnet) */ ++ .driver_info = RSVD(0) | NCTRL(3) }, ++ { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10c8, 0xff), /* Telit FE910C04 (rmnet) */ ++ .driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), + .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),