linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Huang Wei <huangwei@kylinos.cn>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	leStoppe <lestoppe@gmail.com>, Craig Hesling <craig@hesling.com>
Subject: Re: [PATCH] USB: serial: simple: narrow OWON match to avoid breaking VDS1022
Date: Mon, 17 Aug 2026 10:47:44 +0200	[thread overview]
Message-ID: <aoLKsDMGD3NXT19-@hovoldconsulting.com> (raw)
In-Reply-To: <20260810091322.2201740-1-huangwei@kylinos.cn>

[ +CC: Craig ]

On Mon, Aug 10, 2026 at 05:13:22PM +0800, Huang Wei wrote:
> Commit 4cc01410e1c1 ("USB: serial: simple: add OWON HDS200 series
> oscilloscope support") added a USB_DEVICE() match on VID:PID
> 0x5345:0x1234. OWON uses this same VID:PID across multiple device
> families (HDS, VDS, SDS, PDS), so the overly broad match causes the
> owon driver to also bind to devices like the VDS1022, which previously
> worked fine with the generic usbserial driver.

If it worked fine with the generic usbserial driver then it works fine
with the owon "simple" driver as it's effectively currently just an
alias for the generic driver but with automatic binding.

But based on the rest of the thread, it seems that you perhaps wanted to
say that it worked fine with a libusb based userspace driver?

> Narrow the match to use USB_DEVICE_AND_INTERFACE_INFO() with the
> Physical Interface Device class (bInterfaceClass=0x05,
> bInterfaceSubClass=0x00, bInterfaceProtocol=0x00) as reported in the
> HDS200 USB descriptor. Devices that use a different interface class
> (e.g. vendor-specific 0xff) will no longer be claimed by the owon
> driver and will fall back to the generic driver as before.

There is no fallback to any generic driver if you narrow the match.

And how do you know that won't cause regressions for users that have
started relying on the new driver?

For completeness, could you post the usb-devices (or lsusb -v) output
for the VDS1022?

Doesn't that device also support the SCPI protocol and should generally
work with the owon driver?

> Reported-by: leStoppe <lestoppe@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220193
> Signed-off-by: Huang Wei <huangwei@kylinos.cn>
> ---
>  drivers/usb/serial/usb-serial-simple.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c
> index a0afaf254d12..82509669347e 100644
> --- a/drivers/usb/serial/usb-serial-simple.c
> +++ b/drivers/usb/serial/usb-serial-simple.c
> @@ -100,9 +100,15 @@ 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 on the Physical Interface Device class (0x05)
> + * used by the HDS200 series to avoid binding devices that use a different
> + * interface class (e.g. vendor-specific 0xff) and may require different
> + * handling.
> + */

Multi-line comments should start with /* on its own line.

>  #define OWON_IDS()			\
> -	{ USB_DEVICE(0x5345, 0x1234) } /* HDS200 oscilloscopes and others */
> +	{ USB_DEVICE_AND_INTERFACE_INFO(0x5345, 0x1234, 0x05, 0x00, 0x00) }

And this should be USB_DEVICE_INTERFACE_CLASS().

>  DEVICE(owon, OWON_IDS);
>  
>  /* Siemens USB/MPI adapter */

Johan

  parent reply	other threads:[~2026-08-17  8:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  9:13 [PATCH] USB: serial: simple: narrow OWON match to avoid breaking VDS1022 Huang Wei
2026-08-10 11:43 ` Greg Kroah-Hartman
2026-08-10 19:40   ` leStoppe
2026-08-11 13:17     ` Huang Wei
2026-08-11 15:18       ` Amit
2026-08-11  7:39   ` Michal Pecio
2026-08-11 13:05   ` Huang Wei
2026-08-17  8:47 ` Johan Hovold [this message]
2026-08-17  9:35   ` Huang Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aoLKsDMGD3NXT19-@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=craig@hesling.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=huangwei@kylinos.cn \
    --cc=lestoppe@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).