Re: [PATCH v2] USB: serial: simple: narrow OWON match to avoid breaking VDS1022

From: Huang Wei

Date: Tue Nov 17 2026 - 06:20:34 EST


On Tue, Nov 17, 2026 at 08:24:39AM +0100, Greg Kroah-Hartman wrote:
> On Tue, Nov 17, 2026 at 03:12:50PM +0800, Huang Wei wrote:
> > Hi Greg,
> >
> > Sorry about that - here's the context.
>
> Sorry about what? You did not quote anything here, as my bot says:
>
> A: http://en.wikipedia.org/wiki/Top_post
> Q: Were do I find info about this thing called top-posting?
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> A: No.
> Q: Should I include quotations after my reply?
>
> http://daringfireball.net/2007/07/on_top
>
> thanks,
>
> greg k-h

You are right, and I apologize for the noise. My last two emails were
both badly formatted: a bare follow-up note with no quoted context,
and then a reply with the text on top and the reference material
below it, without quoting the message I was replying to. Let me fix
that here.

The context: the owon_device entry in
drivers/usb/serial/usb-serial-simple.c was added by commit 4cc01410e1c1
with a broad USB_DEVICE(0x5345, 0x1234) match for the OWON HDS200
series. OWON reuses that VID:PID across device families, so the entry
also claims the VDS1022 oscilloscope, which is driven from userspace
over libusb and stops working once a kernel driver binds its
interface.

The v2 below (sent Oct 15, reworked per Johan's review and carrying
the reporter's Tested-by) narrows the match to the HDS200 interface
tuple (class 5, subclass 0, protocol 0), which excludes the
reporter's VDS1022 (class 5, subclass 6, protocol 0x50).

The open problem surfaced during review: Craig Hesling found that
the VDS1022I variant reports the same (5, 0, 0) tuple as the HDS200
series, so the narrowed match would still claim that variant. On
Nov 3rd I laid out this data and asked Johan how he wants to
proceed - take the v2 as-is, revert to the broad match, or take
another approach. The thread has been waiting on that decision
since.

Full discussion:
https://lore.kernel.org/linux-usb/20260810091322.2201740-1-huangwei@xxxxxxxxxx/

The v2 for reference:

A USB_DEVICE() match on VID:PID 0x5345:0x1234 was added to the
owon_device entry in drivers/usb/serial/usb-serial-simple.c by
commit 4cc01410e1c1 ("USB: serial: simple: add OWON HDS200 series
oscilloscope support"). OWON uses this VID:PID across multiple device
families (HDS, VDS, SDS, PDS), so the broad match makes the
owon_device driver also claim devices such as the VDS1022.

While the owon_device entry is equivalent to the generic usbserial
driver for kernel-space users, the VDS1022 is a headless scope that
is driven from userspace over libusb (e.g. the florentbr/Owon-VDS1022
tool), which can no longer claim the interface once a kernel driver
binds to it. Prior to that commit, no in-kernel driver claimed these
interfaces.

The two families can be told apart by their interface descriptors
despite sharing interface class 5 (Physical): the HDS200 series
reports subclass 0 and protocol 0, as documented by the HDS272S dump
(firmware V5.7.1) in that commit's message, while the VDS1022 reports
subclass 6 and protocol 0x50. Match the full HDS200 interface
tuple so that the VDS1022 remains unclaimed and stays accessible to
userspace tools.

Reported-by: leStoppe <lestoppe@xxxxxxxxx>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220193
Tested-by: leStoppe <lestoppe@xxxxxxxxx>
Signed-off-by: Huang Wei <huangwei@xxxxxxxxxx>

---
Changes in v2:
- Rework the commit message per Johan Hovold's review: describe the
libusb-based userspace breakage instead of the incorrect claim
about falling back to the generic usbserial driver.
- Match on the full HDS200 interface tuple (subclass 0, protocol 0)
instead of the interface class alone: both the HDS200 and the
VDS1022 are interface class 5, so a class-only match would still
claim the VDS1022. The tuple values are verified against the
HDS272S dump in the commit message of 4cc01410e1c1 and the VDS1022
dump provided by leStoppe.
- Fix the multi-line comment style.
---
drivers/usb/serial/usb-serial-simple.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
index a0afaf254d12..879508f54d69 100644
--- a/drivers/usb/serial/usb-serial-simple.c
+++ b/drivers/usb/serial/usb-serial-simple.c
@@ -100,9 +100,17 @@ 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 */
+/*
+ * OWON electronic test and measurement equipment driver.
+ * OWON uses the same VID:PID (0x5345:0x1234) for multiple device
+ * families (HDS, VDS, SDS, PDS). Match the full interface tuple
+ * reported by the HDS200 series (class 5, subclass 0, protocol 0) so
+ * that devices with a different interface tuple, such as the VDS1022
+ * (class 5, subclass 6, protocol 0x50) which is driven from userspace
+ * over libusb, remain unclaimed.
+ */
#define OWON_IDS() \
- { USB_DEVICE(0x5345, 0x1234) } /* HDS200 oscilloscopes and others */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x5345, 0x1234, 0x05, 0x00, 0x00) }
DEVICE(owon, OWON_IDS);

/* Siemens USB/MPI adapter */
--
2.25.1


Thanks,
Huang Wei