mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Huang Wei <huangwei@kylinos.cn>
Cc: Craig Hesling <craig@hesling.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	leStoppe <lestoppe@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] USB: serial: simple: narrow OWON match to avoid breaking VDS1022
Date: Tue, 17 Nov 2026 15:05:09 +0100	[thread overview]
Message-ID: <avxfFRBXbdhs66cC@hovoldconsulting.com> (raw)
In-Reply-To: <20261103022311.1011677-1-huangwei@kylinos.cn>

On Tue, Nov 03, 2026 at 10:23:11AM +0800, Huang Wei wrote:
> Hi Craig,
> 
> Thanks for the additional data points - and for the comprehensive
> descriptor table. This changes the picture significantly.
> 
> The VDS1022I reporting (5, 0, 0) - the same tuple as the HDS200 -
> means the full-tuple match in my v2 doesn't actually solve the
> problem it was designed for. It would:
> 
>   - correctly claim the HDS200 (which wants serial)
>   - incorrectly claim the VDS1022I (which needs libusb, same
>     florentbr tooling as the VDS1022)
> 
> So the interface tuple is not a reliable discriminator for this
> VID:PID - OWON reuses the same tuples across device families with
> different userspace needs. That undermines any approach based on
> narrowing the match at the interface level.
> 
> Given this, I think the options are:
> 
>   1. Keep the original broad USB_DEVICE() match, accepting that
>      VDS1022/VDS1022I users need to blacklist the driver (this was
>      the status quo before my patches, and users have workarounds)
> 
>   2. Remove the owon entry entirely and have HDS200 users move to
>      libusb as well (uniform but breaks existing serial users)
> 
>   3. Find a different discriminator (bcdDevice, string descriptors)
>      - but these seem equally unlikely to be reliable given OWON's
>      firmware practices
> 
> Johan - given that the interface-level narrowing doesn't work,
> what's your preference? Should we revert to the original match and
> document the libusb incompatibility, or is there another approach?

As there apparently are now users of the in-kernel driver and libusb has
a mechanism for unbinding kernel drivers when userspace wants to handle
a device itself, my preference is option 1.

I've tried to skim these threads and IIUC the only issue here is that
some java-wrapper around libusb doesn't provide the unbind mechanism?

For the cases where the userspace driver does not unbind the driver
itself, users are currently already using a udev rule to unbind the
driver (or they use module blacklisting). And they probably already have
udev rules to set up permissions.

And there should be nothing preventing a userspace application from
using the tty interface even if a device does not speak SCPI, right?

Johan

  reply	other threads:[~2026-11-17 14:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-10  9:13 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
2026-08-17  9:35   ` Huang Wei
2026-10-13 21:42     ` Amit
2026-10-15  2:54       ` Huang Wei
2026-10-29 23:46         ` craig
2026-10-30  1:28           ` Huang Wei
2026-10-30  7:44             ` craig
2026-11-03  2:23               ` Huang Wei
2026-11-17 14:05                 ` Johan Hovold [this message]
2026-10-15  2:54 ` [PATCH v2] " Huang Wei
2026-10-28  2:15   ` Huang Wei
2026-11-16  2:45   ` Huang Wei
2026-11-16  9:37     ` Greg Kroah-Hartman
2026-11-17  7:12       ` Huang Wei
2026-11-17  7:24         ` Greg Kroah-Hartman
2026-11-17 11:19           ` 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=avxfFRBXbdhs66cC@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

all inboxes | Powered by JetHome®