From: Greg Kroah-Hartman Date: Sun, 22 Dec 2024 07:30:22 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.1.122~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f76b96c672461fa9ecf314f3bfe93a90881f9744;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-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 edac-amd64-simplify-ecc-check-on-unified-memory-controllers.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-mtk-sd-disable-wakeup-in-.remove-and-in-the-error-path-of-.probe.patch mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch net-tun-fix-tun_napi_alloc_frags.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.6/chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch b/queue-6.6/chelsio-chtls-prevent-potential-integer-overflow-on-32bit.patch new file mode 100644 index 00000000000..bb08f07ff78 --- /dev/null +++ b/queue-6.6/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.6/drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch b/queue-6.6/drm-modes-avoid-divide-by-zero-harder-in-drm_mode_vrefresh.patch new file mode 100644 index 00000000000..4046274d535 --- /dev/null +++ b/queue-6.6/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 +@@ -1285,14 +1285,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) +@@ -1300,6 +1297,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.6/edac-amd64-simplify-ecc-check-on-unified-memory-controllers.patch b/queue-6.6/edac-amd64-simplify-ecc-check-on-unified-memory-controllers.patch new file mode 100644 index 00000000000..7761dd1e7be --- /dev/null +++ b/queue-6.6/edac-amd64-simplify-ecc-check-on-unified-memory-controllers.patch @@ -0,0 +1,76 @@ +From 747367340ca6b5070728b86ae36ad6747f66b2fb Mon Sep 17 00:00:00 2001 +From: "Borislav Petkov (AMD)" +Date: Wed, 11 Dec 2024 12:07:42 +0100 +Subject: EDAC/amd64: Simplify ECC check on unified memory controllers + +From: Borislav Petkov (AMD) + +commit 747367340ca6b5070728b86ae36ad6747f66b2fb upstream. + +The intent of the check is to see whether at least one UMC has ECC +enabled. So do that instead of tracking which ones are enabled in masks +which are too small in size anyway and lead to not loading the driver on +Zen4 machines with UMCs enabled over UMC8. + +Fixes: e2be5955a886 ("EDAC/amd64: Add support for AMD Family 19h Models 10h-1Fh and A0h-AFh") +Reported-by: Avadhut Naik +Signed-off-by: Borislav Petkov (AMD) +Tested-by: Avadhut Naik +Reviewed-by: Avadhut Naik +Cc: +Link: https://lore.kernel.org/r/20241210212054.3895697-1-avadhut.naik@amd.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/edac/amd64_edac.c | 34 +++++++++++----------------------- + 1 file changed, 11 insertions(+), 23 deletions(-) + +--- a/drivers/edac/amd64_edac.c ++++ b/drivers/edac/amd64_edac.c +@@ -3620,36 +3620,24 @@ static bool dct_ecc_enabled(struct amd64 + + static bool umc_ecc_enabled(struct amd64_pvt *pvt) + { +- u8 umc_en_mask = 0, ecc_en_mask = 0; +- u16 nid = pvt->mc_node_id; + struct amd64_umc *umc; +- u8 ecc_en = 0, i; ++ bool ecc_en = false; ++ int i; + ++ /* Check whether at least one UMC is enabled: */ + for_each_umc(i) { + umc = &pvt->umc[i]; + +- /* Only check enabled UMCs. */ +- if (!(umc->sdp_ctrl & UMC_SDP_INIT)) +- continue; +- +- umc_en_mask |= BIT(i); +- +- if (umc->umc_cap_hi & UMC_ECC_ENABLED) +- ecc_en_mask |= BIT(i); ++ if (umc->sdp_ctrl & UMC_SDP_INIT && ++ umc->umc_cap_hi & UMC_ECC_ENABLED) { ++ ecc_en = true; ++ break; ++ } + } + +- /* Check whether at least one UMC is enabled: */ +- if (umc_en_mask) +- ecc_en = umc_en_mask == ecc_en_mask; +- else +- edac_dbg(0, "Node %d: No enabled UMCs.\n", nid); +- +- edac_dbg(3, "Node %d: DRAM ECC %s.\n", nid, (ecc_en ? "enabled" : "disabled")); +- +- if (!ecc_en) +- return false; +- else +- return true; ++ edac_dbg(3, "Node %d: DRAM ECC %s.\n", pvt->mc_node_id, (ecc_en ? "enabled" : "disabled")); ++ ++ return ecc_en; + } + + static inline void diff --git a/queue-6.6/efivarfs-fix-error-on-non-existent-file.patch b/queue-6.6/efivarfs-fix-error-on-non-existent-file.patch new file mode 100644 index 00000000000..8037e7d3cf9 --- /dev/null +++ b/queue-6.6/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 +@@ -107,9 +107,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.6/hexagon-disable-constant-extender-optimization-for-llvm-prior-to-19.1.0.patch b/queue-6.6/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.6/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.6/i2c-riic-always-round-up-when-calculating-bus-period.patch b/queue-6.6/i2c-riic-always-round-up-when-calculating-bus-period.patch new file mode 100644 index 00000000000..d56712dbb2b --- /dev/null +++ b/queue-6.6/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 +@@ -324,7 +324,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.6/kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch b/queue-6.6/kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch new file mode 100644 index 00000000000..1cdfd05e155 --- /dev/null +++ b/queue-6.6/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 +@@ -36,6 +36,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; +@@ -44,14 +64,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 +@@ -13694,6 +13694,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.6/mmc-mtk-sd-disable-wakeup-in-.remove-and-in-the-error-path-of-.probe.patch b/queue-6.6/mmc-mtk-sd-disable-wakeup-in-.remove-and-in-the-error-path-of-.probe.patch new file mode 100644 index 00000000000..7da2d924411 --- /dev/null +++ b/queue-6.6/mmc-mtk-sd-disable-wakeup-in-.remove-and-in-the-error-path-of-.probe.patch @@ -0,0 +1,41 @@ +From f3d87abe11ed04d1b23a474a212f0e5deeb50892 Mon Sep 17 00:00:00 2001 +From: Joe Hattori +Date: Tue, 3 Dec 2024 11:34:42 +0900 +Subject: mmc: mtk-sd: disable wakeup in .remove() and in the error path of .probe() + +From: Joe Hattori + +commit f3d87abe11ed04d1b23a474a212f0e5deeb50892 upstream. + +Current implementation leaves pdev->dev as a wakeup source. Add a +device_init_wakeup(&pdev->dev, false) call in the .remove() function and +in the error path of the .probe() function. + +Signed-off-by: Joe Hattori +Fixes: 527f36f5efa4 ("mmc: mediatek: add support for SDIO eint wakup IRQ") +Cc: stable@vger.kernel.org +Message-ID: <20241203023442.2434018-1-joe@pf.is.s.u-tokyo.ac.jp> +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/mtk-sd.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/mmc/host/mtk-sd.c ++++ b/drivers/mmc/host/mtk-sd.c +@@ -2862,6 +2862,7 @@ release_clk: + msdc_gate_clock(host); + platform_set_drvdata(pdev, NULL); + release_mem: ++ device_init_wakeup(&pdev->dev, false); + if (host->dma.gpd) + dma_free_coherent(&pdev->dev, + 2 * sizeof(struct mt_gpdma_desc), +@@ -2895,6 +2896,7 @@ static void msdc_drv_remove(struct platf + host->dma.gpd, host->dma.gpd_addr); + dma_free_coherent(&pdev->dev, MAX_BD_NUM * sizeof(struct mt_bdma_desc), + host->dma.bd, host->dma.bd_addr); ++ device_init_wakeup(&pdev->dev, false); + } + + static void msdc_save_reg(struct msdc_host *host) diff --git a/queue-6.6/mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch b/queue-6.6/mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch new file mode 100644 index 00000000000..99fef96587a --- /dev/null +++ b/queue-6.6/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 +@@ -1525,7 +1525,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.6/net-tun-fix-tun_napi_alloc_frags.patch b/queue-6.6/net-tun-fix-tun_napi_alloc_frags.patch new file mode 100644 index 00000000000..dec268db2e7 --- /dev/null +++ b/queue-6.6/net-tun-fix-tun_napi_alloc_frags.patch @@ -0,0 +1,84 @@ +From 429fde2d81bcef0ebab002215358955704586457 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Thu, 12 Dec 2024 22:22:47 +0000 +Subject: net: tun: fix tun_napi_alloc_frags() + +From: Eric Dumazet + +commit 429fde2d81bcef0ebab002215358955704586457 upstream. + +syzbot reported the following crash [1] + +Issue came with the blamed commit. Instead of going through +all the iov components, we keep using the first one +and end up with a malformed skb. + +[1] + +kernel BUG at net/core/skbuff.c:2849 ! +Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI +CPU: 0 UID: 0 PID: 6230 Comm: syz-executor132 Not tainted 6.13.0-rc1-syzkaller-00407-g96b6fcc0ee41 #0 +Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/25/2024 + RIP: 0010:__pskb_pull_tail+0x1568/0x1570 net/core/skbuff.c:2848 +Code: 38 c1 0f 8c 32 f1 ff ff 4c 89 f7 e8 92 96 74 f8 e9 25 f1 ff ff e8 e8 ae 09 f8 48 8b 5c 24 08 e9 eb fb ff ff e8 d9 ae 09 f8 90 <0f> 0b 66 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 +RSP: 0018:ffffc90004cbef30 EFLAGS: 00010293 +RAX: ffffffff8995c347 RBX: 00000000fffffff2 RCX: ffff88802cf45a00 +RDX: 0000000000000000 RSI: 00000000fffffff2 RDI: 0000000000000000 +RBP: ffff88807df0c06a R08: ffffffff8995b084 R09: 1ffff1100fbe185c +R10: dffffc0000000000 R11: ffffed100fbe185d R12: ffff888076e85d50 +R13: ffff888076e85c80 R14: ffff888076e85cf4 R15: ffff888076e85c80 +FS: 00007f0dca6ea6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 00007f0dca6ead58 CR3: 00000000119da000 CR4: 00000000003526f0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 +Call Trace: + + skb_cow_data+0x2da/0xcb0 net/core/skbuff.c:5284 + tipc_aead_decrypt net/tipc/crypto.c:894 [inline] + tipc_crypto_rcv+0x402/0x24e0 net/tipc/crypto.c:1844 + tipc_rcv+0x57e/0x12a0 net/tipc/node.c:2109 + tipc_l2_rcv_msg+0x2bd/0x450 net/tipc/bearer.c:668 + __netif_receive_skb_list_ptype net/core/dev.c:5720 [inline] + __netif_receive_skb_list_core+0x8b7/0x980 net/core/dev.c:5762 + __netif_receive_skb_list net/core/dev.c:5814 [inline] + netif_receive_skb_list_internal+0xa51/0xe30 net/core/dev.c:5905 + gro_normal_list include/net/gro.h:515 [inline] + napi_complete_done+0x2b5/0x870 net/core/dev.c:6256 + napi_complete include/linux/netdevice.h:567 [inline] + tun_get_user+0x2ea0/0x4890 drivers/net/tun.c:1982 + tun_chr_write_iter+0x10d/0x1f0 drivers/net/tun.c:2057 + do_iter_readv_writev+0x600/0x880 + vfs_writev+0x376/0xba0 fs/read_write.c:1050 + do_writev+0x1b6/0x360 fs/read_write.c:1096 + do_syscall_x64 arch/x86/entry/common.c:52 [inline] + do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 + entry_SYSCALL_64_after_hwframe+0x77/0x7f + +Fixes: de4f5fed3f23 ("iov_iter: add iter_iovec() helper") +Reported-by: syzbot+4f66250f6663c0c1d67e@syzkaller.appspotmail.com +Closes: https://lore.kernel.org/netdev/675b61aa.050a0220.599f4.00bb.GAE@google.com/T/#u +Cc: stable@vger.kernel.org +Signed-off-by: Eric Dumazet +Reviewed-by: Joe Damato +Reviewed-by: Jens Axboe +Acked-by: Willem de Bruijn +Acked-by: Michael S. Tsirkin +Link: https://patch.msgid.link/20241212222247.724674-1-edumazet@google.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/tun.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/tun.c ++++ b/drivers/net/tun.c +@@ -1487,7 +1487,7 @@ static struct sk_buff *tun_napi_alloc_fr + skb->truesize += skb->data_len; + + for (i = 1; i < it->nr_segs; i++) { +- const struct iovec *iov = iter_iov(it); ++ const struct iovec *iov = iter_iov(it) + i; + size_t fragsz = iov->iov_len; + struct page *page; + void *frag; diff --git a/queue-6.6/series b/queue-6.6/series index dd3a83a69fe..e6fe033c634 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -55,3 +55,19 @@ ipvs-fix-clamp-of-ip_vs_conn_tab-on-small-memory-sys.patch netfilter-ipset-fix-for-recursive-locking-warning.patch selftests-openvswitch-fix-tcpdump-execution.patch net-mdiobus-fix-an-of-node-reference-leak.patch +mmc-sdhci-tegra-remove-sdhci_quirk_broken_adma_zerolen_desc-quirk.patch +mmc-mtk-sd-disable-wakeup-in-.remove-and-in-the-error-path-of-.probe.patch +edac-amd64-simplify-ecc-check-on-unified-memory-controllers.patch +kvm-x86-cache-cpuid.0xd-xstate-offsets-sizes-during-module-init.patch +net-tun-fix-tun_napi_alloc_frags.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.6/thunderbolt-improve-redrive-mode-handling.patch b/queue-6.6/thunderbolt-improve-redrive-mode-handling.patch new file mode 100644 index 00000000000..684a82eacc4 --- /dev/null +++ b/queue-6.6/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 +@@ -1930,6 +1930,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; +@@ -2690,6 +2721,7 @@ static int tb_start(struct tb *tb, bool + 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); +@@ -2705,6 +2737,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"); +@@ -2797,6 +2830,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"); +@@ -2860,6 +2894,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); +@@ -2891,6 +2931,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.6/usb-serial-option-add-mediatek-t7xx-compositions.patch b/queue-6.6/usb-serial-option-add-mediatek-t7xx-compositions.patch new file mode 100644 index 00000000000..792fb06f382 --- /dev/null +++ b/queue-6.6/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.6/usb-serial-option-add-meig-smart-slm770a.patch b/queue-6.6/usb-serial-option-add-meig-smart-slm770a.patch new file mode 100644 index 00000000000..dff81e08e12 --- /dev/null +++ b/queue-6.6/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.6/usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch b/queue-6.6/usb-serial-option-add-netprisma-lcuk54-modules-for-wwan-ready.patch new file mode 100644 index 00000000000..8d6dc74a9b4 --- /dev/null +++ b/queue-6.6/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.6/usb-serial-option-add-tcl-ik512-mbim-ecm.patch b/queue-6.6/usb-serial-option-add-tcl-ik512-mbim-ecm.patch new file mode 100644 index 00000000000..4ab6fac7ccd --- /dev/null +++ b/queue-6.6/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.6/usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch b/queue-6.6/usb-serial-option-add-telit-fe910c04-rmnet-compositions.patch new file mode 100644 index 00000000000..7faa98cdac2 --- /dev/null +++ b/queue-6.6/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),