public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Rob Herring <robh@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 0/3] USB-Serial serdev support
Date: Fri, 24 Oct 2025 15:26:31 +0200	[thread overview]
Message-ID: <aPt-h_jzlG3uyLUx@hovoldconsulting.com> (raw)
In-Reply-To: <20251024124047.gnhxvjxjv7ie6ryy@pengutronix.de>

On Fri, Oct 24, 2025 at 02:40:47PM +0200, Marco Felsch wrote:
> On 25-10-24, Johan Hovold wrote:
> > On Fri, Oct 24, 2025 at 11:27:38AM +0200, Marco Felsch wrote:
> > > On 25-10-24, Johan Hovold wrote:
> > > > On Thu, Oct 23, 2025 at 03:48:28PM +0200, Marco Felsch wrote:
> > > > > On 25-10-23, Johan Hovold wrote:
> > > > > > On Thu, Mar 13, 2025 at 08:40:44PM +0100, Marco Felsch wrote:
> > > > > > > On 25-03-11, Johan Hovold wrote:
> > > > > > > > On Tue, Sep 17, 2024 at 06:49:48AM +0200, Marco Felsch wrote:
> > > > > > > > > On 24-09-09, Johan Hovold wrote:
> > 
> > > > It's still one of the issues that need to addressed.
> > > 
> > > Yes but this shouldn't be an issue with this patchset. So far the
> > > smallest DT-describale USB entities are the interfaces.
> > 
> > It is an issue with this patchset since any binding for USB serdev will
> > need to take both kind of devices into account. Period.
> 
> Sorry but I really don't see the issue. As of now DT abstractions
> supports all my use-cases. If $another_developer has an USB device which
> actually exposes multiple serial ports behind a single usb-interface,
> fine. But in that case $another_developer needs to add the
> support/extend the support for it if he wants to use it in combination
> with serdev.

Fine, but if you only care about your use case then you can keep your
implementation out-of-tree until someone comes with along with enough
time to solve this properly.

> > > > > > You will also see the following kind of warnings in the logs:
> > > > > > 
> > > > > > ttyUSB ttyUSB0: tty_hangup: tty->count(1) != (#fd's(0) + #kopen's(0))
> > > > > > ttyUSB ttyUSB0: tty_port_close_start: tty->count = 1 port count = 0
> > > > > > 
> > > > > > which are due to the fact that serdev does not support hangups which are
> > > > > > used during teardown of USB serial ports.

> > You should see it in your test setup as well. Unless the bluetooth
> > driver you use is doing something funky (e.g. not closing the port).
> > 
> > I'm testing with a mock gnss device here.
> 
> Okay, let me test this. Just that we're on the same page: The test is to
> remove the serdev (bluetooth, gnss, ...) driver, right?

No, trigger a disconnect like you did before, or do a physical
disconnect, by wiring up a regular USB port.
 
> > > > Also, that commit message needs to more work since you don't really
> > > > motivate why you think it's needed (e.g. as serdev ports can't be shared
> > > > with user space).

> > No, my point was that serdev devices *are* not shared with user space,
> > you don't need to use that new kopen helper for that.

> > That helper sets the new TTY_PORT_KOPENED flag which suppresses the
> > warning on hangups.
> 
> Okay, so you meant the TTY_PORT_KOPENED flag. According the
> documentation of tty_kopen_exclusive():
> 
> | tty_kopen_exclusive - open a tty device for kernel
> 
> isn't that exactly what serdev-ttyport should do to "not share it with
> user space"? IMHO it's an implementation detail if the logic behind
> "open a tty device for kernel" is only built around a flag to suppress
> the warning.

I give up. I've already told you that serdev does not share anything
with user space.

Johan

  reply	other threads:[~2025-10-24 13:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 14:08 [PATCH 0/3] USB-Serial serdev support Marco Felsch
2024-08-07 14:08 ` [PATCH 1/3] serdev: ttyport: make use of tty_kopen_exclusive Marco Felsch
2024-08-08  7:51   ` Jiri Slaby
2024-08-19 10:19     ` Marco Felsch
2024-08-19 10:42       ` Jiri Slaby
2024-08-19 12:23         ` Marco Felsch
2024-08-21  7:25     ` Marco Felsch
2024-08-07 14:08 ` [PATCH 2/3] USB: serial: cosmetic cleanup <space><tab> mix Marco Felsch
2024-08-07 14:08 ` [PATCH 3/3] USB: serial: enable serdev support Marco Felsch
2024-09-09 12:03 ` [PATCH 0/3] USB-Serial " Johan Hovold
2024-09-17  4:49   ` Marco Felsch
2025-03-11  8:12     ` Johan Hovold
2025-03-13 19:40       ` Marco Felsch
2025-08-21 16:40         ` Marco Felsch
2025-10-23 12:32         ` Johan Hovold
2025-10-23 13:48           ` Marco Felsch
2025-10-24  8:21             ` Johan Hovold
2025-10-24  9:27               ` Marco Felsch
2025-10-24 10:32                 ` Johan Hovold
2025-10-24 12:40                   ` Marco Felsch
2025-10-24 13:26                     ` Johan Hovold [this message]
2025-10-24 16:22                       ` Marco Felsch
2024-10-01  7:24 ` Marco Felsch
2024-10-01  7:29   ` Greg Kroah-Hartman
2024-10-01  7:47     ` Marco Felsch
2024-10-28 22:57     ` Marco Felsch
2025-03-03 11:25       ` Marco Felsch
2025-03-11  8:20       ` Johan Hovold

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=aPt-h_jzlG3uyLUx@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=robh@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