]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Apr 2025 17:24:31 +0000 (19:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Apr 2025 17:24:31 +0000 (19:24 +0200)
added patches:
serial-msm-configure-correct-working-mode-before-starting-earlycon.patch
serial-sifive-lock-port-in-startup-shutdown-callbacks.patch
usb-cdns3-fix-deadlock-when-using-ncm-gadget.patch
usb-dwc3-gadget-check-that-event-count-does-not-exceed-event-buffer-length.patch
usb-ohci-add-quirk-for-ls7a-ohci-controller-rev-0x02.patch
usb-quirks-add-delay-init-quirk-for-sandisk-3.2gen1-flash-drive.patch
usb-quirks-add-delay_init-quirk-for-silicon-motion-flash-drive.patch
usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch
usb-serial-option-add-sierra-wireless-em9291.patch
usb-serial-simple-add-owon-hds200-series-oscilloscope-support.patch
usb-vli-disk-crashes-if-lpm-is-used.patch

12 files changed:
queue-5.4/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch [new file with mode: 0644]
queue-5.4/serial-sifive-lock-port-in-startup-shutdown-callbacks.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/usb-cdns3-fix-deadlock-when-using-ncm-gadget.patch [new file with mode: 0644]
queue-5.4/usb-dwc3-gadget-check-that-event-count-does-not-exceed-event-buffer-length.patch [new file with mode: 0644]
queue-5.4/usb-ohci-add-quirk-for-ls7a-ohci-controller-rev-0x02.patch [new file with mode: 0644]
queue-5.4/usb-quirks-add-delay-init-quirk-for-sandisk-3.2gen1-flash-drive.patch [new file with mode: 0644]
queue-5.4/usb-quirks-add-delay_init-quirk-for-silicon-motion-flash-drive.patch [new file with mode: 0644]
queue-5.4/usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch [new file with mode: 0644]
queue-5.4/usb-serial-option-add-sierra-wireless-em9291.patch [new file with mode: 0644]
queue-5.4/usb-serial-simple-add-owon-hds200-series-oscilloscope-support.patch [new file with mode: 0644]
queue-5.4/usb-vli-disk-crashes-if-lpm-is-used.patch [new file with mode: 0644]

diff --git a/queue-5.4/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch b/queue-5.4/serial-msm-configure-correct-working-mode-before-starting-earlycon.patch
new file mode 100644 (file)
index 0000000..82f9622
--- /dev/null
@@ -0,0 +1,54 @@
+From 7094832b5ac861b0bd7ed8866c93cb15ef619996 Mon Sep 17 00:00:00 2001
+From: Stephan Gerhold <stephan.gerhold@linaro.org>
+Date: Tue, 8 Apr 2025 19:22:47 +0200
+Subject: serial: msm: Configure correct working mode before starting earlycon
+
+From: Stephan Gerhold <stephan.gerhold@linaro.org>
+
+commit 7094832b5ac861b0bd7ed8866c93cb15ef619996 upstream.
+
+The MSM UART DM controller supports different working modes, e.g. DMA or
+the "single-character mode", where all reads/writes operate on a single
+character rather than 4 chars (32-bit) at once. When using earlycon,
+__msm_console_write() always writes 4 characters at a time, but we don't
+know which mode the bootloader was using and we don't set the mode either.
+
+This causes garbled output if the bootloader was using the single-character
+mode, because only every 4th character appears in the serial console, e.g.
+
+  "[ 00oni pi  000xf0[ 00i s 5rm9(l)l s 1  1 SPMTA 7:C 5[ 00A ade k d[
+   00ano:ameoi .Q1B[ 00ac _idaM00080oo'"
+
+If the bootloader was using the DMA ("DM") mode, output would likely fail
+entirely. Later, when the full serial driver probes, the port is
+re-initialized and output works as expected.
+
+Fix this also for earlycon by clearing the DMEN register and
+reset+re-enable the transmitter to apply the change. This ensures the
+transmitter is in the expected state before writing any output.
+
+Cc: stable <stable@kernel.org>
+Fixes: 0efe72963409 ("tty: serial: msm: Add earlycon support")
+Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
+Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
+Link: https://lore.kernel.org/r/20250408-msm-serial-earlycon-v1-1-429080127530@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/msm_serial.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/tty/serial/msm_serial.c
++++ b/drivers/tty/serial/msm_serial.c
+@@ -1723,6 +1723,12 @@ msm_serial_early_console_setup_dm(struct
+       if (!device->port.membase)
+               return -ENODEV;
++      /* Disable DM / single-character modes */
++      msm_write(&device->port, 0, UARTDM_DMEN);
++      msm_write(&device->port, MSM_UART_CR_CMD_RESET_RX, MSM_UART_CR);
++      msm_write(&device->port, MSM_UART_CR_CMD_RESET_TX, MSM_UART_CR);
++      msm_write(&device->port, MSM_UART_CR_TX_ENABLE, MSM_UART_CR);
++
+       device->con->write = msm_serial_early_write_dm;
+       return 0;
+ }
diff --git a/queue-5.4/serial-sifive-lock-port-in-startup-shutdown-callbacks.patch b/queue-5.4/serial-sifive-lock-port-in-startup-shutdown-callbacks.patch
new file mode 100644 (file)
index 0000000..e811ca3
--- /dev/null
@@ -0,0 +1,59 @@
+From e1ca3ff28ab1e2c1e70713ef3fa7943c725742c3 Mon Sep 17 00:00:00 2001
+From: Ryo Takakura <ryotkkr98@gmail.com>
+Date: Sat, 12 Apr 2025 09:18:47 +0900
+Subject: serial: sifive: lock port in startup()/shutdown() callbacks
+
+From: Ryo Takakura <ryotkkr98@gmail.com>
+
+commit e1ca3ff28ab1e2c1e70713ef3fa7943c725742c3 upstream.
+
+startup()/shutdown() callbacks access SIFIVE_SERIAL_IE_OFFS.
+The register is also accessed from write() callback.
+
+If console were printing and startup()/shutdown() callback
+gets called, its access to the register could be overwritten.
+
+Add port->lock to startup()/shutdown() callbacks to make sure
+their access to SIFIVE_SERIAL_IE_OFFS is synchronized against
+write() callback.
+
+Fixes: 45c054d0815b ("tty: serial: add driver for the SiFive UART")
+Signed-off-by: Ryo Takakura <ryotkkr98@gmail.com>
+Reviewed-by: Petr Mladek <pmladek@suse.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: John Ogness <john.ogness@linutronix.de>
+Rule: add
+Link: https://lore.kernel.org/stable/20250330003522.386632-1-ryotkkr98%40gmail.com
+Link: https://lore.kernel.org/r/20250412001847.183221-1-ryotkkr98@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/sifive.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/tty/serial/sifive.c
++++ b/drivers/tty/serial/sifive.c
+@@ -596,8 +596,11 @@ static void sifive_serial_break_ctl(stru
+ static int sifive_serial_startup(struct uart_port *port)
+ {
+       struct sifive_serial_port *ssp = port_to_sifive_serial_port(port);
++      unsigned long flags;
++      uart_port_lock_irqsave(&ssp->port, &flags);
+       __ssp_enable_rxwm(ssp);
++      uart_port_unlock_irqrestore(&ssp->port, flags);
+       return 0;
+ }
+@@ -605,9 +608,12 @@ static int sifive_serial_startup(struct
+ static void sifive_serial_shutdown(struct uart_port *port)
+ {
+       struct sifive_serial_port *ssp = port_to_sifive_serial_port(port);
++      unsigned long flags;
++      uart_port_lock_irqsave(&ssp->port, &flags);
+       __ssp_disable_rxwm(ssp);
+       __ssp_disable_txwm(ssp);
++      uart_port_unlock_irqrestore(&ssp->port, flags);
+ }
+ /**
index ec2bf02ce3e47e8883837b081b93661c1edc151a..eef501572ae743a80a791ce28bda801de59d6abd 100644 (file)
@@ -146,3 +146,14 @@ net_sched-hfsc-fix-a-potential-uaf-in-hfsc_dequeue-t.patch
 virtio_console-fix-missing-byte-order-handling-for-cols-and-rows.patch
 mcb-fix-a-double-free-bug-in-chameleon_parse_gdd.patch
 usb-storage-quirk-for-adata-portable-hdd-ch94.patch
+serial-msm-configure-correct-working-mode-before-starting-earlycon.patch
+serial-sifive-lock-port-in-startup-shutdown-callbacks.patch
+usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch
+usb-serial-option-add-sierra-wireless-em9291.patch
+usb-serial-simple-add-owon-hds200-series-oscilloscope-support.patch
+usb-cdns3-fix-deadlock-when-using-ncm-gadget.patch
+usb-ohci-add-quirk-for-ls7a-ohci-controller-rev-0x02.patch
+usb-dwc3-gadget-check-that-event-count-does-not-exceed-event-buffer-length.patch
+usb-quirks-add-delay_init-quirk-for-silicon-motion-flash-drive.patch
+usb-quirks-add-delay-init-quirk-for-sandisk-3.2gen1-flash-drive.patch
+usb-vli-disk-crashes-if-lpm-is-used.patch
diff --git a/queue-5.4/usb-cdns3-fix-deadlock-when-using-ncm-gadget.patch b/queue-5.4/usb-cdns3-fix-deadlock-when-using-ncm-gadget.patch
new file mode 100644 (file)
index 0000000..b9721e1
--- /dev/null
@@ -0,0 +1,48 @@
+From a1059896f2bfdcebcdc7153c3be2307ea319501f Mon Sep 17 00:00:00 2001
+From: Ralph Siemsen <ralph.siemsen@linaro.org>
+Date: Tue, 18 Mar 2025 11:09:32 -0400
+Subject: usb: cdns3: Fix deadlock when using NCM gadget
+
+From: Ralph Siemsen <ralph.siemsen@linaro.org>
+
+commit a1059896f2bfdcebcdc7153c3be2307ea319501f upstream.
+
+The cdns3 driver has the same NCM deadlock as fixed in cdnsp by commit
+58f2fcb3a845 ("usb: cdnsp: Fix deadlock issue during using NCM gadget").
+
+Under PREEMPT_RT the deadlock can be readily triggered by heavy network
+traffic, for example using "iperf --bidir" over NCM ethernet link.
+
+The deadlock occurs because the threaded interrupt handler gets
+preempted by a softirq, but both are protected by the same spinlock.
+Prevent deadlock by disabling softirq during threaded irq handler.
+
+Cc: stable <stable@kernel.org>
+Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
+Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
+Acked-by: Peter Chen <peter.chen@kernel.org>
+Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Link: https://lore.kernel.org/r/20250318-rfs-cdns3-deadlock-v2-1-bfd9cfcee732@linaro.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/cdns3/gadget.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/cdns3/gadget.c
++++ b/drivers/usb/cdns3/gadget.c
+@@ -1920,6 +1920,7 @@ static int cdns3_gadget_ep_disable(struc
+                         "%s is already disabled\n", priv_ep->name))
+               return 0;
++      local_bh_disable();
+       spin_lock_irqsave(&priv_dev->lock, flags);
+       trace_cdns3_gadget_ep_disable(priv_ep);
+@@ -1976,6 +1977,7 @@ static int cdns3_gadget_ep_disable(struc
+       priv_ep->flags &= ~EP_ENABLED;
+       spin_unlock_irqrestore(&priv_dev->lock, flags);
++      local_bh_enable();
+       return ret;
+ }
diff --git a/queue-5.4/usb-dwc3-gadget-check-that-event-count-does-not-exceed-event-buffer-length.patch b/queue-5.4/usb-dwc3-gadget-check-that-event-count-does-not-exceed-event-buffer-length.patch
new file mode 100644 (file)
index 0000000..7292651
--- /dev/null
@@ -0,0 +1,49 @@
+From 63ccd26cd1f6600421795f6ca3e625076be06c9f Mon Sep 17 00:00:00 2001
+From: Frode Isaksen <frode@meta.com>
+Date: Thu, 3 Apr 2025 09:28:03 +0200
+Subject: usb: dwc3: gadget: check that event count does not exceed event buffer length
+
+From: Frode Isaksen <frode@meta.com>
+
+commit 63ccd26cd1f6600421795f6ca3e625076be06c9f upstream.
+
+The event count is read from register DWC3_GEVNTCOUNT.
+There is a check for the count being zero, but not for exceeding the
+event buffer length.
+Check that event count does not exceed event buffer length,
+avoiding an out-of-bounds access when memcpy'ing the event.
+Crash log:
+Unable to handle kernel paging request at virtual address ffffffc0129be000
+pc : __memcpy+0x114/0x180
+lr : dwc3_check_event_buf+0xec/0x348
+x3 : 0000000000000030 x2 : 000000000000dfc4
+x1 : ffffffc0129be000 x0 : ffffff87aad60080
+Call trace:
+__memcpy+0x114/0x180
+dwc3_interrupt+0x24/0x34
+
+Signed-off-by: Frode Isaksen <frode@meta.com>
+Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
+Cc: stable <stable@kernel.org>
+Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Link: https://lore.kernel.org/r/20250403072907.448524-1-fisaksen@baylibre.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/dwc3/gadget.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/usb/dwc3/gadget.c
++++ b/drivers/usb/dwc3/gadget.c
+@@ -3652,6 +3652,12 @@ static irqreturn_t dwc3_check_event_buf(
+       if (!count)
+               return IRQ_NONE;
++      if (count > evt->length) {
++              dev_err_ratelimited(dwc->dev, "invalid count(%u) > evt->length(%u)\n",
++                      count, evt->length);
++              return IRQ_NONE;
++      }
++
+       evt->count = count;
+       evt->flags |= DWC3_EVENT_PENDING;
diff --git a/queue-5.4/usb-ohci-add-quirk-for-ls7a-ohci-controller-rev-0x02.patch b/queue-5.4/usb-ohci-add-quirk-for-ls7a-ohci-controller-rev-0x02.patch
new file mode 100644 (file)
index 0000000..2cbc5b3
--- /dev/null
@@ -0,0 +1,67 @@
+From bcb60d438547355b8f9ad48645909139b64d3482 Mon Sep 17 00:00:00 2001
+From: Huacai Chen <chenhuacai@loongson.cn>
+Date: Fri, 28 Mar 2025 12:00:59 +0800
+Subject: USB: OHCI: Add quirk for LS7A OHCI controller (rev 0x02)
+
+From: Huacai Chen <chenhuacai@loongson.cn>
+
+commit bcb60d438547355b8f9ad48645909139b64d3482 upstream.
+
+The OHCI controller (rev 0x02) under LS7A PCI host has a hardware flaw.
+MMIO register with offset 0x60/0x64 is treated as legacy PS2-compatible
+keyboard/mouse interface, which confuse the OHCI controller. Since OHCI
+only use a 4KB BAR resource indeed, the LS7A OHCI controller's 32KB BAR
+is wrapped around (the second 4KB BAR space is the same as the first 4KB
+internally). So we can add an 4KB offset (0x1000) to the OHCI registers
+(from the PCI BAR resource) as a quirk.
+
+Cc: stable <stable@kernel.org>
+Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
+Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Mingcong Bai <baimingcong@loongson.cn>
+Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
+Link: https://lore.kernel.org/r/20250328040059.3672979-1-chenhuacai@loongson.cn
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/ohci-pci.c |   23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+--- a/drivers/usb/host/ohci-pci.c
++++ b/drivers/usb/host/ohci-pci.c
+@@ -165,6 +165,25 @@ static int ohci_quirk_amd700(struct usb_
+       return 0;
+ }
++static int ohci_quirk_loongson(struct usb_hcd *hcd)
++{
++      struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
++
++      /*
++       * Loongson's LS7A OHCI controller (rev 0x02) has a
++       * flaw. MMIO register with offset 0x60/64 is treated
++       * as legacy PS2-compatible keyboard/mouse interface.
++       * Since OHCI only use 4KB BAR resource, LS7A OHCI's
++       * 32KB BAR is wrapped around (the 2nd 4KB BAR space
++       * is the same as the 1st 4KB internally). So add 4KB
++       * offset (0x1000) to the OHCI registers as a quirk.
++       */
++      if (pdev->revision == 0x2)
++              hcd->regs += SZ_4K;     /* SZ_4K = 0x1000 */
++
++      return 0;
++}
++
+ static int ohci_quirk_qemu(struct usb_hcd *hcd)
+ {
+       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+@@ -225,6 +244,10 @@ static const struct pci_device_id ohci_p
+               .driver_data = (unsigned long)ohci_quirk_amd700,
+       },
+       {
++              PCI_DEVICE(PCI_VENDOR_ID_LOONGSON, 0x7a24),
++              .driver_data = (unsigned long)ohci_quirk_loongson,
++      },
++      {
+               .vendor         = PCI_VENDOR_ID_APPLE,
+               .device         = 0x003f,
+               .subvendor      = PCI_SUBVENDOR_ID_REDHAT_QUMRANET,
diff --git a/queue-5.4/usb-quirks-add-delay-init-quirk-for-sandisk-3.2gen1-flash-drive.patch b/queue-5.4/usb-quirks-add-delay-init-quirk-for-sandisk-3.2gen1-flash-drive.patch
new file mode 100644 (file)
index 0000000..986b152
--- /dev/null
@@ -0,0 +1,37 @@
+From 37ffdbd695c02189dbf23d6e7d2385e0299587ca Mon Sep 17 00:00:00 2001
+From: Miao Li <limiao@kylinos.cn>
+Date: Mon, 14 Apr 2025 14:29:35 +0800
+Subject: usb: quirks: Add delay init quirk for SanDisk 3.2Gen1 Flash Drive
+
+From: Miao Li <limiao@kylinos.cn>
+
+commit 37ffdbd695c02189dbf23d6e7d2385e0299587ca upstream.
+
+The SanDisk 3.2Gen1 Flash Drive, which VID:PID is in 0781:55a3,
+just like Silicon Motion Flash Drive:
+https://lore.kernel.org/r/20250401023027.44894-1-limiao870622@163.com
+also needs the DELAY_INIT quirk, or it will randomly work incorrectly
+(e.g.: lsusb and can't list this device info) when connecting Huawei
+hisi platforms and doing thousand of reboot test circles.
+
+Cc: stable <stable@kernel.org>
+Signed-off-by: Miao Li <limiao@kylinos.cn>
+Signed-off-by: Lei Huang <huanglei@kylinos.cn>
+Link: https://lore.kernel.org/r/20250414062935.159024-1-limiao870622@163.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -366,6 +366,9 @@ static const struct usb_device_id usb_qu
+       { USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM },
+       { USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM },
++      /* SanDisk Corp. SanDisk 3.2Gen1 */
++      { USB_DEVICE(0x0781, 0x55a3), .driver_info = USB_QUIRK_DELAY_INIT },
++
+       /* Realforce 87U Keyboard */
+       { USB_DEVICE(0x0853, 0x011b), .driver_info = USB_QUIRK_NO_LPM },
diff --git a/queue-5.4/usb-quirks-add-delay_init-quirk-for-silicon-motion-flash-drive.patch b/queue-5.4/usb-quirks-add-delay_init-quirk-for-silicon-motion-flash-drive.patch
new file mode 100644 (file)
index 0000000..dd34277
--- /dev/null
@@ -0,0 +1,34 @@
+From 2932b6b547ec36ad2ed60fbf2117c0e46bb7d40a Mon Sep 17 00:00:00 2001
+From: Miao Li <limiao@kylinos.cn>
+Date: Tue, 1 Apr 2025 10:30:27 +0800
+Subject: usb: quirks: add DELAY_INIT quirk for Silicon Motion Flash Drive
+
+From: Miao Li <limiao@kylinos.cn>
+
+commit 2932b6b547ec36ad2ed60fbf2117c0e46bb7d40a upstream.
+
+Silicon Motion Flash Drive connects to Huawei hisi platforms and
+performs a system reboot test for two thousand circles, it will
+randomly work incorrectly on boot, set DELAY_INIT quirk can workaround
+this issue.
+
+Signed-off-by: Miao Li <limiao@kylinos.cn>
+Cc: stable <stable@kernel.org>
+Link: https://lore.kernel.org/r/20250401023027.44894-1-limiao870622@163.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -380,6 +380,9 @@ static const struct usb_device_id usb_qu
+       { USB_DEVICE(0x0904, 0x6103), .driver_info =
+                       USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL },
++      /* Silicon Motion Flash Drive */
++      { USB_DEVICE(0x090c, 0x1000), .driver_info = USB_QUIRK_DELAY_INIT },
++
+       /* Sound Devices USBPre2 */
+       { USB_DEVICE(0x0926, 0x0202), .driver_info =
+                       USB_QUIRK_ENDPOINT_BLACKLIST },
diff --git a/queue-5.4/usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch b/queue-5.4/usb-serial-ftdi_sio-add-support-for-abacus-electrics-optical-probe.patch
new file mode 100644 (file)
index 0000000..77a3394
--- /dev/null
@@ -0,0 +1,50 @@
+From b399078f882b6e5d32da18b6c696cc84b12f90d5 Mon Sep 17 00:00:00 2001
+From: Michael Ehrenreich <michideep@gmail.com>
+Date: Mon, 17 Mar 2025 06:17:15 +0100
+Subject: USB: serial: ftdi_sio: add support for Abacus Electrics Optical Probe
+
+From: Michael Ehrenreich <michideep@gmail.com>
+
+commit b399078f882b6e5d32da18b6c696cc84b12f90d5 upstream.
+
+Abacus Electrics makes optical probes for interacting with smart meters
+over an optical interface.
+
+At least one version uses an FT232B chip (as detected by ftdi_sio) with
+a custom USB PID, which needs to be added to the list to make the device
+work in a plug-and-play fashion.
+
+Signed-off-by: Michael Ehrenreich <michideep@gmail.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/ftdi_sio.c     |    2 ++
+ drivers/usb/serial/ftdi_sio_ids.h |    5 +++++
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -1071,6 +1071,8 @@ static const struct usb_device_id id_tab
+       { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 1) },
+       { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 2) },
+       { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 3) },
++      /* Abacus Electrics */
++      { USB_DEVICE(FTDI_VID, ABACUS_OPTICAL_PROBE_PID) },
+       { }                                     /* Terminating entry */
+ };
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -436,6 +436,11 @@
+ #define LINX_FUTURE_2_PID   0xF44C    /* Linx future device */
+ /*
++ * Abacus Electrics
++ */
++#define ABACUS_OPTICAL_PROBE_PID      0xf458 /* ABACUS ELECTRICS Optical Probe */
++
++/*
+  * Oceanic product ids
+  */
+ #define FTDI_OCEANIC_PID      0xF460  /* Oceanic dive instrument */
diff --git a/queue-5.4/usb-serial-option-add-sierra-wireless-em9291.patch b/queue-5.4/usb-serial-option-add-sierra-wireless-em9291.patch
new file mode 100644 (file)
index 0000000..c28dccc
--- /dev/null
@@ -0,0 +1,63 @@
+From 968e1cbb1f6293c3add9607f80b5ce3d29f57583 Mon Sep 17 00:00:00 2001
+From: Adam Xue <zxue@semtech.com>
+Date: Mon, 14 Apr 2025 14:14:37 -0700
+Subject: USB: serial: option: add Sierra Wireless EM9291
+
+From: Adam Xue <zxue@semtech.com>
+
+commit 968e1cbb1f6293c3add9607f80b5ce3d29f57583 upstream.
+
+Add Sierra Wireless EM9291.
+
+Interface 0: MBIM control
+          1: MBIM data
+          3: AT port
+          4: Diagnostic port
+
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
+D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=1199 ProdID=90e3 Rev=00.06
+S:  Manufacturer=Sierra Wireless, Incorporated
+S:  Product=Sierra Wireless EM9291
+S:  SerialNumber=xxxxxxxxxxxxxxxx
+C:  #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=(none)
+E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
+I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none)
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+
+Signed-off-by: Adam Xue <zxue@semtech.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/option.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -611,6 +611,7 @@ static void option_instat_callback(struc
+ /* Sierra Wireless products */
+ #define SIERRA_VENDOR_ID                      0x1199
+ #define SIERRA_PRODUCT_EM9191                 0x90d3
++#define SIERRA_PRODUCT_EM9291                 0x90e3
+ /* UNISOC (Spreadtrum) products */
+ #define UNISOC_VENDOR_ID                      0x1782
+@@ -2432,6 +2433,8 @@ static const struct usb_device_id option
+       { 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) },
+       { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
++      { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x30) },
++      { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x40) },
+       { 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_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff),                     /* TCL IK512 MBIM */
diff --git a/queue-5.4/usb-serial-simple-add-owon-hds200-series-oscilloscope-support.patch b/queue-5.4/usb-serial-simple-add-owon-hds200-series-oscilloscope-support.patch
new file mode 100644 (file)
index 0000000..634b22f
--- /dev/null
@@ -0,0 +1,129 @@
+From 4cc01410e1c1dd075df10f750775c81d1cb6672b Mon Sep 17 00:00:00 2001
+From: Craig Hesling <craig@hesling.com>
+Date: Tue, 8 Apr 2025 16:27:03 -0700
+Subject: USB: serial: simple: add OWON HDS200 series oscilloscope support
+
+From: Craig Hesling <craig@hesling.com>
+
+commit 4cc01410e1c1dd075df10f750775c81d1cb6672b upstream.
+
+Add serial support for OWON HDS200 series oscilloscopes and likely
+many other pieces of OWON test equipment.
+
+OWON HDS200 series devices host two USB endpoints, designed to
+facilitate bidirectional SCPI. SCPI is a predominately ASCII text
+protocol for test/measurement equipment. Having a serial/tty interface
+for these devices lowers the barrier to entry for anyone trying to
+write programs to communicate with them.
+
+The following shows the USB descriptor for the OWON HDS272S running
+firmware V5.7.1:
+
+Bus 001 Device 068: ID 5345:1234 Owon PDS6062T Oscilloscope
+Negotiated speed: Full Speed (12Mbps)
+Device Descriptor:
+  bLength                18
+  bDescriptorType         1
+  bcdUSB               2.00
+  bDeviceClass            0 [unknown]
+  bDeviceSubClass         0 [unknown]
+  bDeviceProtocol         0
+  bMaxPacketSize0        64
+  idVendor           0x5345 Owon
+  idProduct          0x1234 PDS6062T Oscilloscope
+  bcdDevice            1.00
+  iManufacturer           1 oscilloscope
+  iProduct                2 oscilloscope
+  iSerial                 3 oscilloscope
+  bNumConfigurations      1
+  Configuration Descriptor:
+    bLength                 9
+    bDescriptorType         2
+    wTotalLength       0x0029
+    bNumInterfaces          1
+    bConfigurationValue     1
+    iConfiguration          0
+    bmAttributes         0x80
+      (Bus Powered)
+    MaxPower              100mA
+    Interface Descriptor:
+      bLength                 9
+      bDescriptorType         4
+      bInterfaceNumber        0
+      bAlternateSetting       0
+      bNumEndpoints           2
+      bInterfaceClass         5 Physical Interface Device
+      bInterfaceSubClass      0 [unknown]
+      bInterfaceProtocol      0
+      iInterface              0
+      ** UNRECOGNIZED:  09 21 11 01 00 01 22 5f 00
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x81  EP 1 IN
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0040  1x 64 bytes
+        bInterval              32
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x01  EP 1 OUT
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0040  1x 64 bytes
+        bInterval              32
+Device Status:     0x0000
+  (Bus Powered)
+
+OWON appears to be using the same USB Vendor and Product ID for many
+of their oscilloscopes. Looking at the discussion about the USB
+vendor/product ID, in the link bellow, suggests that this VID/PID is
+shared with VDS, SDS, PDS, and now the HDS series oscilloscopes.
+Available documentation for these devices seems to indicate that all
+use a similar SCPI protocol, some with RS232 options. It is likely that
+this same simple serial setup would work correctly for them all.
+
+Link: https://usb-ids.gowdy.us/read/UD/5345/1234
+Signed-off-by: Craig Hesling <craig@hesling.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/usb-serial-simple.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/serial/usb-serial-simple.c
++++ b/drivers/usb/serial/usb-serial-simple.c
+@@ -101,6 +101,11 @@ DEVICE(nokia, NOKIA_IDS);
+       { USB_DEVICE(0x09d7, 0x0100) }  /* NovAtel FlexPack GPS */
+ DEVICE_N(novatel_gps, NOVATEL_IDS, 3);
++/* OWON electronic test and measurement equipment driver */
++#define OWON_IDS()                    \
++      { USB_DEVICE(0x5345, 0x1234) } /* HDS200 oscilloscopes and others */
++DEVICE(owon, OWON_IDS);
++
+ /* Siemens USB/MPI adapter */
+ #define SIEMENS_IDS()                 \
+       { USB_DEVICE(0x908, 0x0004) }
+@@ -135,6 +140,7 @@ static struct usb_serial_driver * const
+       &motorola_tetra_device,
+       &nokia_device,
+       &novatel_gps_device,
++      &owon_device,
+       &siemens_mpi_device,
+       &suunto_device,
+       &vivopay_device,
+@@ -154,6 +160,7 @@ static const struct usb_device_id id_tab
+       MOTOROLA_TETRA_IDS(),
+       NOKIA_IDS(),
+       NOVATEL_IDS(),
++      OWON_IDS(),
+       SIEMENS_IDS(),
+       SUUNTO_IDS(),
+       VIVOPAY_IDS(),
diff --git a/queue-5.4/usb-vli-disk-crashes-if-lpm-is-used.patch b/queue-5.4/usb-vli-disk-crashes-if-lpm-is-used.patch
new file mode 100644 (file)
index 0000000..3d984ce
--- /dev/null
@@ -0,0 +1,31 @@
+From e00b39a4f3552c730f1e24c8d62c4a8c6aad4e5d Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Tue, 8 Apr 2025 15:57:46 +0200
+Subject: USB: VLI disk crashes if LPM is used
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit e00b39a4f3552c730f1e24c8d62c4a8c6aad4e5d upstream.
+
+This device needs the NO_LPM quirk.
+
+Cc: stable <stable@kernel.org>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Link: https://lore.kernel.org/r/20250408135800.792515-1-oneukum@suse.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/quirks.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -540,6 +540,9 @@ static const struct usb_device_id usb_qu
+       { USB_DEVICE(0x2040, 0x7200), .driver_info =
+                       USB_QUIRK_CONFIG_INTF_STRINGS },
++      /* VLI disk */
++      { USB_DEVICE(0x2109, 0x0711), .driver_info = USB_QUIRK_NO_LPM },
++
+       /* Raydium Touchscreen */
+       { USB_DEVICE(0x2386, 0x3114), .driver_info = USB_QUIRK_NO_LPM },