From: Greg Kroah-Hartman Date: Thu, 30 Nov 2023 14:54:35 +0000 (+0000) Subject: 5.4-stable patches X-Git-Tag: v5.15.141~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2cda97f114f59af15793975ca866241adf27f0d2;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: bcache-check-return-value-from-btree_node_alloc_replacement.patch bcache-prevent-potential-division-by-zero-error.patch usb-dwc2-write-hcint-with-intmask-applied.patch usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch usb-dwc3-set-the-dma-max_seg_size.patch usb-serial-option-add-fibocom-l7xx-modules.patch usb-serial-option-don-t-claim-interface-4-for-zte-mf290.patch usb-serial-option-fix-fm101r-gl-defines.patch --- diff --git a/queue-5.4/bcache-check-return-value-from-btree_node_alloc_replacement.patch b/queue-5.4/bcache-check-return-value-from-btree_node_alloc_replacement.patch new file mode 100644 index 00000000000..221378599ed --- /dev/null +++ b/queue-5.4/bcache-check-return-value-from-btree_node_alloc_replacement.patch @@ -0,0 +1,36 @@ +From 777967e7e9f6f5f3e153abffb562bffaf4430d26 Mon Sep 17 00:00:00 2001 +From: Coly Li +Date: Mon, 20 Nov 2023 13:24:55 +0800 +Subject: bcache: check return value from btree_node_alloc_replacement() + +From: Coly Li + +commit 777967e7e9f6f5f3e153abffb562bffaf4430d26 upstream. + +In btree_gc_rewrite_node(), pointer 'n' is not checked after it returns +from btree_gc_rewrite_node(). There is potential possibility that 'n' is +a non NULL ERR_PTR(), referencing such error code is not permitted in +following code. Therefore a return value checking is necessary after 'n' +is back from btree_node_alloc_replacement(). + +Signed-off-by: Coly Li +Reported-by: Dan Carpenter +Cc: +Link: https://lore.kernel.org/r/20231120052503.6122-3-colyli@suse.de +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/bcache/btree.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/md/bcache/btree.c ++++ b/drivers/md/bcache/btree.c +@@ -1555,6 +1555,8 @@ static int btree_gc_rewrite_node(struct + return 0; + + n = btree_node_alloc_replacement(replace, NULL); ++ if (IS_ERR(n)) ++ return 0; + + /* recheck reserve after allocating replacement node */ + if (btree_check_reserve(b, NULL)) { diff --git a/queue-5.4/bcache-prevent-potential-division-by-zero-error.patch b/queue-5.4/bcache-prevent-potential-division-by-zero-error.patch new file mode 100644 index 00000000000..b50a7fa22e4 --- /dev/null +++ b/queue-5.4/bcache-prevent-potential-division-by-zero-error.patch @@ -0,0 +1,53 @@ +From 2c7f497ac274a14330208b18f6f734000868ebf9 Mon Sep 17 00:00:00 2001 +From: Rand Deeb +Date: Mon, 20 Nov 2023 13:24:57 +0800 +Subject: bcache: prevent potential division by zero error + +From: Rand Deeb + +commit 2c7f497ac274a14330208b18f6f734000868ebf9 upstream. + +In SHOW(), the variable 'n' is of type 'size_t.' While there is a +conditional check to verify that 'n' is not equal to zero before +executing the 'do_div' macro, concerns arise regarding potential +division by zero error in 64-bit environments. + +The concern arises when 'n' is 64 bits in size, greater than zero, and +the lower 32 bits of it are zeros. In such cases, the conditional check +passes because 'n' is non-zero, but the 'do_div' macro casts 'n' to +'uint32_t,' effectively truncating it to its lower 32 bits. +Consequently, the 'n' value becomes zero. + +To fix this potential division by zero error and ensure precise +division handling, this commit replaces the 'do_div' macro with +div64_u64(). div64_u64() is designed to work with 64-bit operands, +guaranteeing that division is performed correctly. + +This change enhances the robustness of the code, ensuring that division +operations yield accurate results in all scenarios, eliminating the +possibility of division by zero, and improving compatibility across +different 64-bit environments. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Signed-off-by: Rand Deeb +Cc: +Signed-off-by: Coly Li +Link: https://lore.kernel.org/r/20231120052503.6122-5-colyli@suse.de +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/bcache/sysfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/md/bcache/sysfs.c ++++ b/drivers/md/bcache/sysfs.c +@@ -1057,7 +1057,7 @@ SHOW(__bch_cache) + sum += INITIAL_PRIO - cached[i]; + + if (n) +- do_div(sum, n); ++ sum = div64_u64(sum, n); + + for (i = 0; i < ARRAY_SIZE(q); i++) + q[i] = INITIAL_PRIO - cached[n * (i + 1) / diff --git a/queue-5.4/series b/queue-5.4/series index fa3d238d7df..0635efcecfd 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -38,3 +38,12 @@ usb-serial-option-add-luat-air72-u-series-products.patch hv_netvsc-fix-race-of-register_netdevice_notifier-and-vf-register.patch hv_netvsc-mark-vf-as-slave-before-exposing-it-to-user-mode.patch dm-delay-fix-a-race-between-delay_presuspend-and-del.patch +bcache-check-return-value-from-btree_node_alloc_replacement.patch +bcache-prevent-potential-division-by-zero-error.patch +usb-serial-option-add-fibocom-l7xx-modules.patch +usb-serial-option-fix-fm101r-gl-defines.patch +usb-serial-option-don-t-claim-interface-4-for-zte-mf290.patch +usb-dwc2-write-hcint-with-intmask-applied.patch +usb-dwc3-set-the-dma-max_seg_size.patch +usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch +usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch diff --git a/queue-5.4/usb-dwc2-write-hcint-with-intmask-applied.patch b/queue-5.4/usb-dwc2-write-hcint-with-intmask-applied.patch new file mode 100644 index 00000000000..fa70aa0e977 --- /dev/null +++ b/queue-5.4/usb-dwc2-write-hcint-with-intmask-applied.patch @@ -0,0 +1,80 @@ +From 0583bc776ca5b5a3f5752869fc31cf7322df2b35 Mon Sep 17 00:00:00 2001 +From: Oliver Neukum +Date: Wed, 15 Nov 2023 15:45:07 +0100 +Subject: USB: dwc2: write HCINT with INTMASK applied + +From: Oliver Neukum + +commit 0583bc776ca5b5a3f5752869fc31cf7322df2b35 upstream. + +dwc2_hc_n_intr() writes back INTMASK as read but evaluates it +with intmask applied. In stress testing this causes spurious +interrupts like this: + +[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 - ChHltd set, but reason is unknown +[Mon Aug 14 10:51:07 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 +[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 0 - ChHltd set, but reason is unknown +[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 +[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown +[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04600001 +[Mon Aug 14 10:51:08 2023] dwc2 3f980000.usb: dwc2_update_urb_state_abn(): trimming xfer length + +Applying INTMASK prevents this. The issue exists in all versions of the +driver. + +Signed-off-by: Oliver Neukum +Tested-by: Ivan Ivanov +Tested-by: Andrea della Porta +Link: https://lore.kernel.org/r/20231115144514.15248-1-oneukum@suse.com +Cc: stable +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc2/hcd_intr.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +--- a/drivers/usb/dwc2/hcd_intr.c ++++ b/drivers/usb/dwc2/hcd_intr.c +@@ -2045,15 +2045,17 @@ static void dwc2_hc_n_intr(struct dwc2_h + { + struct dwc2_qtd *qtd; + struct dwc2_host_chan *chan; +- u32 hcint, hcintmsk; ++ u32 hcint, hcintraw, hcintmsk; + + chan = hsotg->hc_ptr_array[chnum]; + +- hcint = dwc2_readl(hsotg, HCINT(chnum)); ++ hcintraw = dwc2_readl(hsotg, HCINT(chnum)); + hcintmsk = dwc2_readl(hsotg, HCINTMSK(chnum)); ++ hcint = hcintraw & hcintmsk; ++ dwc2_writel(hsotg, hcint, HCINT(chnum)); ++ + if (!chan) { + dev_err(hsotg->dev, "## hc_ptr_array for channel is NULL ##\n"); +- dwc2_writel(hsotg, hcint, HCINT(chnum)); + return; + } + +@@ -2062,11 +2064,9 @@ static void dwc2_hc_n_intr(struct dwc2_h + chnum); + dev_vdbg(hsotg->dev, + " hcint 0x%08x, hcintmsk 0x%08x, hcint&hcintmsk 0x%08x\n", +- hcint, hcintmsk, hcint & hcintmsk); ++ hcintraw, hcintmsk, hcint); + } + +- dwc2_writel(hsotg, hcint, HCINT(chnum)); +- + /* + * If we got an interrupt after someone called + * dwc2_hcd_endpoint_disable() we don't want to crash below +@@ -2076,8 +2076,7 @@ static void dwc2_hc_n_intr(struct dwc2_h + return; + } + +- chan->hcint = hcint; +- hcint &= hcintmsk; ++ chan->hcint = hcintraw; + + /* + * If the channel was halted due to a dequeue, the qtd list might diff --git a/queue-5.4/usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch b/queue-5.4/usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch new file mode 100644 index 00000000000..15f49f83860 --- /dev/null +++ b/queue-5.4/usb-dwc3-qcom-fix-resource-leaks-on-probe-deferral.patch @@ -0,0 +1,73 @@ +From 51392a1879ff06dc21b68aef4825f6ef68a7be42 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Fri, 17 Nov 2023 18:36:48 +0100 +Subject: USB: dwc3: qcom: fix resource leaks on probe deferral + +From: Johan Hovold + +commit 51392a1879ff06dc21b68aef4825f6ef68a7be42 upstream. + +The driver needs to deregister and free the newly allocated dwc3 core +platform device on ACPI probe errors (e.g. probe deferral) and on driver +unbind but instead it leaked those resources while erroneously dropping +a reference to the parent platform device which is still in use. + +For OF probing the driver takes a reference to the dwc3 core platform +device which has also always been leaked. + +Fix the broken ACPI tear down and make sure to drop the dwc3 core +reference for both OF and ACPI. + +Fixes: 8fd95da2cfb5 ("usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()") +Fixes: 2bc02355f8ba ("usb: dwc3: qcom: Add support for booting with ACPI") +Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") +Cc: stable@vger.kernel.org # 4.18 +Cc: Christophe JAILLET +Cc: Lee Jones +Signed-off-by: Johan Hovold +Acked-by: Andrew Halaney +Link: https://lore.kernel.org/r/20231117173650.21161-2-johan+linaro@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/dwc3-qcom.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +--- a/drivers/usb/dwc3/dwc3-qcom.c ++++ b/drivers/usb/dwc3/dwc3-qcom.c +@@ -553,6 +553,7 @@ static int dwc3_qcom_of_register_core(st + if (!qcom->dwc3) { + ret = -ENODEV; + dev_err(dev, "failed to get dwc3 platform device\n"); ++ of_platform_depopulate(dev); + } + + node_put: +@@ -666,7 +667,7 @@ static int dwc3_qcom_probe(struct platfo + + if (ret) { + dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret); +- goto depopulate; ++ goto clk_disable; + } + + qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev); +@@ -692,7 +693,8 @@ depopulate: + if (np) + of_platform_depopulate(&pdev->dev); + else +- platform_device_put(pdev); ++ platform_device_del(qcom->dwc3); ++ platform_device_put(qcom->dwc3); + clk_disable: + for (i = qcom->num_clocks - 1; i >= 0; i--) { + clk_disable_unprepare(qcom->clks[i]); +@@ -714,7 +716,8 @@ static int dwc3_qcom_remove(struct platf + if (np) + of_platform_depopulate(&pdev->dev); + else +- platform_device_put(pdev); ++ platform_device_del(qcom->dwc3); ++ platform_device_put(qcom->dwc3); + + for (i = qcom->num_clocks - 1; i >= 0; i--) { + clk_disable_unprepare(qcom->clks[i]); diff --git a/queue-5.4/usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch b/queue-5.4/usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch new file mode 100644 index 00000000000..e2633aadc19 --- /dev/null +++ b/queue-5.4/usb-dwc3-qcom-fix-wakeup-after-probe-deferral.patch @@ -0,0 +1,70 @@ +From 41f5a0973259db9e4e3c9963d36505f80107d1a0 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Mon, 20 Nov 2023 17:16:06 +0100 +Subject: USB: dwc3: qcom: fix wakeup after probe deferral + +From: Johan Hovold + +commit 41f5a0973259db9e4e3c9963d36505f80107d1a0 upstream. + +The Qualcomm glue driver is overriding the interrupt trigger types +defined by firmware when requesting the wakeup interrupts during probe. + +This can lead to a failure to map the DP/DM wakeup interrupts after a +probe deferral as the firmware defined trigger types do not match the +type used for the initial mapping: + + irq: type mismatch, failed to map hwirq-14 for interrupt-controller@b220000! + irq: type mismatch, failed to map hwirq-15 for interrupt-controller@b220000! + +Fix this by not overriding the firmware provided trigger types when +requesting the wakeup interrupts. + +Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") +Cc: stable@vger.kernel.org # 4.18 +Signed-off-by: Johan Hovold +Reviewed-by: Andrew Halaney +Link: https://lore.kernel.org/r/20231120161607.7405-3-johan+linaro@kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/dwc3-qcom.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/usb/dwc3/dwc3-qcom.c ++++ b/drivers/usb/dwc3/dwc3-qcom.c +@@ -361,7 +361,7 @@ static int dwc3_qcom_setup_irq(struct pl + irq_set_status_flags(irq, IRQ_NOAUTOEN); + ret = devm_request_threaded_irq(qcom->dev, irq, NULL, + qcom_dwc3_resume_irq, +- IRQF_TRIGGER_HIGH | IRQF_ONESHOT, ++ IRQF_ONESHOT, + "qcom_dwc3 HS", qcom); + if (ret) { + dev_err(qcom->dev, "hs_phy_irq failed: %d\n", ret); +@@ -376,7 +376,7 @@ static int dwc3_qcom_setup_irq(struct pl + irq_set_status_flags(irq, IRQ_NOAUTOEN); + ret = devm_request_threaded_irq(qcom->dev, irq, NULL, + qcom_dwc3_resume_irq, +- IRQF_TRIGGER_HIGH | IRQF_ONESHOT, ++ IRQF_ONESHOT, + "qcom_dwc3 DP_HS", qcom); + if (ret) { + dev_err(qcom->dev, "dp_hs_phy_irq failed: %d\n", ret); +@@ -391,7 +391,7 @@ static int dwc3_qcom_setup_irq(struct pl + irq_set_status_flags(irq, IRQ_NOAUTOEN); + ret = devm_request_threaded_irq(qcom->dev, irq, NULL, + qcom_dwc3_resume_irq, +- IRQF_TRIGGER_HIGH | IRQF_ONESHOT, ++ IRQF_ONESHOT, + "qcom_dwc3 DM_HS", qcom); + if (ret) { + dev_err(qcom->dev, "dm_hs_phy_irq failed: %d\n", ret); +@@ -406,7 +406,7 @@ static int dwc3_qcom_setup_irq(struct pl + irq_set_status_flags(irq, IRQ_NOAUTOEN); + ret = devm_request_threaded_irq(qcom->dev, irq, NULL, + qcom_dwc3_resume_irq, +- IRQF_TRIGGER_HIGH | IRQF_ONESHOT, ++ IRQF_ONESHOT, + "qcom_dwc3 SS", qcom); + if (ret) { + dev_err(qcom->dev, "ss_phy_irq failed: %d\n", ret); diff --git a/queue-5.4/usb-dwc3-set-the-dma-max_seg_size.patch b/queue-5.4/usb-dwc3-set-the-dma-max_seg_size.patch new file mode 100644 index 00000000000..58e5cafbfe5 --- /dev/null +++ b/queue-5.4/usb-dwc3-set-the-dma-max_seg_size.patch @@ -0,0 +1,36 @@ +From 8bbae288a85abed6a1cf7d185d8b9dc2f5dcb12c Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda +Date: Fri, 27 Oct 2023 11:28:20 +0000 +Subject: usb: dwc3: set the dma max_seg_size + +From: Ricardo Ribalda + +commit 8bbae288a85abed6a1cf7d185d8b9dc2f5dcb12c upstream. + +Allow devices to have dma operations beyond 4K, and avoid warnings such +as: + +DMA-API: dwc3 a600000.usb: mapping sg segment longer than device claims to support [len=86016] [max=65536] + +Cc: stable@vger.kernel.org +Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver") +Reported-by: Zubin Mithra +Signed-off-by: Ricardo Ribalda +Acked-by: Thinh Nguyen +Link: https://lore.kernel.org/r/20231026-dwc3-v2-1-1d4fd5c3e067@chromium.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/core.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/dwc3/core.c ++++ b/drivers/usb/dwc3/core.c +@@ -1556,6 +1556,8 @@ static int dwc3_probe(struct platform_de + + pm_runtime_put(dev); + ++ dma_set_max_seg_size(dev, UINT_MAX); ++ + return 0; + + err5: diff --git a/queue-5.4/usb-serial-option-add-fibocom-l7xx-modules.patch b/queue-5.4/usb-serial-option-add-fibocom-l7xx-modules.patch new file mode 100644 index 00000000000..84206875eab --- /dev/null +++ b/queue-5.4/usb-serial-option-add-fibocom-l7xx-modules.patch @@ -0,0 +1,106 @@ +From e389fe8b68137344562fb6e4d53d8a89ef6212dd Mon Sep 17 00:00:00 2001 +From: Victor Fragoso +Date: Tue, 21 Nov 2023 21:05:56 +0000 +Subject: USB: serial: option: add Fibocom L7xx modules + +From: Victor Fragoso + +commit e389fe8b68137344562fb6e4d53d8a89ef6212dd upstream. + +Add support for Fibocom L716-EU module series. + +L716-EU is a Fibocom module based on ZTE's V3E/V3T chipset. + +Device creates multiple interfaces when connected to PC as follows: + - Network Interface: ECM or RNDIS (set by FW or AT Command) + - ttyUSB0: AT port + - ttyUSB1: Modem port + - ttyUSB2: AT2 port + - ttyUSB3: Trace port for log information + - ADB: ADB port for debugging. ("Driver=usbfs" when ADB server enabled) + +Here are the outputs of lsusb and usb-devices: +$ ls /dev/ttyUSB* +/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 + +usb-devices: +L716-EU (ECM mode): +T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 51 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=2cb7 ProdID=0001 Rev= 1.00 +S: Manufacturer=Fibocom,Incorporated +S: Product=Fibocom Mobile Boardband +S: SerialNumber=1234567890ABCDEF +C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA +A: FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 +I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether +E: Ad=87(I) Atr=03(Int.) MxPS= 16 Ivl=32ms +I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether +I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether +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=ff Prot=ff Driver=option +E: Ad=82(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=ff Prot=ff Driver=option +E: Ad=83(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=ff Prot=ff Driver=option +E: Ad=84(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=ff Prot=ff Driver=option +E: Ad=85(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=42 Prot=01 Driver=usbfs +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +L716-EU (RNDIS mode): +T: Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 49 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=2cb7 ProdID=0001 Rev= 1.00 +S: Manufacturer=Fibocom,Incorporated +S: Product=Fibocom Mobile Boardband +S: SerialNumber=1234567890ABCDEF +C:* #Ifs= 7 Cfg#= 1 Atr=e0 MxPwr=500mA +A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03 +I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=rndis_host +E: Ad=87(I) Atr=03(Int.) MxPS= 8 Ivl=32ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host +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=ff Prot=ff Driver=option +E: Ad=82(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=ff Prot=ff Driver=option +E: Ad=83(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=ff Prot=ff Driver=option +E: Ad=84(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=ff Prot=ff Driver=option +E: Ad=85(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=42 Prot=01 Driver=usbfs +E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms + +Signed-off-by: Victor Fragoso +Reviewed-by: Lars Melin +Cc: stable@vger.kernel.org +Signed-off-by: Johan Hovold +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/serial/option.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -2251,6 +2251,7 @@ static const struct usb_device_id option + .driver_info = RSVD(4) | RSVD(5) | RSVD(6) }, + { USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */ + { USB_DEVICE_INTERFACE_CLASS(0x1782, 0x4d11, 0xff) }, /* Fibocom L610 (ECM/RNDIS mode) */ ++ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x0001, 0xff, 0xff, 0xff) }, /* Fibocom L716-EU (ECM/RNDIS mode) */ + { USB_DEVICE(0x2cb7, 0x0104), /* Fibocom NL678 series */ + .driver_info = RSVD(4) | RSVD(5) }, + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff), /* Fibocom NL678 series */ diff --git a/queue-5.4/usb-serial-option-don-t-claim-interface-4-for-zte-mf290.patch b/queue-5.4/usb-serial-option-don-t-claim-interface-4-for-zte-mf290.patch new file mode 100644 index 00000000000..6b208090d9c --- /dev/null +++ b/queue-5.4/usb-serial-option-don-t-claim-interface-4-for-zte-mf290.patch @@ -0,0 +1,65 @@ +From 8771127e25d6c20d458ad27cf32f7fcfc1755e05 Mon Sep 17 00:00:00 2001 +From: Lech Perczak +Date: Sat, 18 Nov 2023 00:19:17 +0100 +Subject: USB: serial: option: don't claim interface 4 for ZTE MF290 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Lech Perczak + +commit 8771127e25d6c20d458ad27cf32f7fcfc1755e05 upstream. + +Interface 4 is used by for QMI interface in stock firmware of MF28D, the +router which uses MF290 modem. Free the interface up, to rebind it to +qmi_wwan driver. +The proper configuration is: + +Interface mapping is: +0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI + +T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 +D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 +P: Vendor=19d2 ProdID=0189 Rev= 0.00 +S: Manufacturer=ZTE, Incorporated +S: Product=ZTE LTE Technologies MSM +C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA +I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms +I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms +I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms +I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option +E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=2ms +E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms +I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan +E: Ad=86(I) Atr=03(Int.) MxPS= 64 Ivl=2ms +E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms +E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms + +Cc: Bjørn Mork +Signed-off-by: Lech Perczak +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, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -1548,7 +1548,8 @@ static const struct usb_device_id option + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0167, 0xff, 0xff, 0xff), + .driver_info = RSVD(4) }, +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0189, 0xff, 0xff, 0xff), ++ .driver_info = RSVD(4) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0191, 0xff, 0xff, 0xff), /* ZTE EuFi890 */ + .driver_info = RSVD(4) }, + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0196, 0xff, 0xff, 0xff) }, diff --git a/queue-5.4/usb-serial-option-fix-fm101r-gl-defines.patch b/queue-5.4/usb-serial-option-fix-fm101r-gl-defines.patch new file mode 100644 index 00000000000..9a5475c6c8f --- /dev/null +++ b/queue-5.4/usb-serial-option-fix-fm101r-gl-defines.patch @@ -0,0 +1,46 @@ +From a1092619dd28ac0fcf23016160a2fdccd98ef935 Mon Sep 17 00:00:00 2001 +From: Puliang Lu +Date: Thu, 26 Oct 2023 20:35:06 +0800 +Subject: USB: serial: option: fix FM101R-GL defines + +From: Puliang Lu + +commit a1092619dd28ac0fcf23016160a2fdccd98ef935 upstream. + +Modify the definition of the two Fibocom FM101R-GL PID macros, which had +their PIDs switched. + +The correct PIDs are: + +- VID:PID 413C:8213, FM101R-GL ESIM are laptop M.2 cards (with + MBIM interfaces for Linux) + +- VID:PID 413C:8215, FM101R-GL are laptop M.2 cards (with + MBIM interface for Linux) + +0x8213: mbim, tty +0x8215: mbim, tty + +Signed-off-by: Puliang Lu +Fixes: 52480e1f1a25 ("USB: serial: option: add Fibocom to DELL custom modem FM101R-GL") +Link: https://lore.kernel.org/lkml/TYZPR02MB508845BAD7936A62A105CE5D89DFA@TYZPR02MB5088.apcprd02.prod.outlook.com/ +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, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -203,8 +203,8 @@ static void option_instat_callback(struc + #define DELL_PRODUCT_5829E_ESIM 0x81e4 + #define DELL_PRODUCT_5829E 0x81e6 + +-#define DELL_PRODUCT_FM101R 0x8213 +-#define DELL_PRODUCT_FM101R_ESIM 0x8215 ++#define DELL_PRODUCT_FM101R_ESIM 0x8213 ++#define DELL_PRODUCT_FM101R 0x8215 + + #define KYOCERA_VENDOR_ID 0x0c88 + #define KYOCERA_PRODUCT_KPC650 0x17da