From: Johan Hovold <johan@kernel.org>
To: Alban Bedel <alban.bedel@lht.dlh.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] USB: serial: Support attaching serdev devices
Date: Fri, 2 Oct 2026 16:56:28 +0200 [thread overview]
Message-ID: <ar_GHJpNwit_wxkQ@hovoldconsulting.com> (raw)
In-Reply-To: <20260921173712.5b41e1ea@OMT-CWNXR4TFW5-LHT>
On Mon, Sep 21, 2026 at 05:37:12PM +0200, Alban Bedel wrote:
> On Fri, 18 Sep 2026 16:56:38 +0200
> Johan Hovold <johan@kernel.org> wrote:
>
> > On Thu, Sep 17, 2026 at 05:21:52PM +0200, Alban Bedel wrote:
> > > On Thu, 17 Sep 2026 15:08:11 +0100
> > > Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> >
> > > > Please read the archives for why we don't want to do this unless/until
> > > > serdev is "fixed" to properly handle dynamic device removals.
> > >
> > > All I could find is the "USB-Serial serdev support" thread from last
> > > year which sadly doesn't provides much details. Like Marco Felsch back
> > > then I tested disabling/enabling the USB port and didn't have any
> > > issue, the serdev device get removed and added back just fine. In my
> > > case the serdev driver provides an I2C bus, all devices on it get
> > > removed and added back again as well and work just fine.
> > >
> > > I really fail to see an issue in pratice, would you care to explain
> > > what I'm missing here?
> >
> > Serial drivers use hangups when tearing down their ports. Serdev does
> > not support that so the port is shut down underneath the serdev client
> > while still in use, which can lead to all sorts of issues.
>
> Hangup from modem status are ignored because serdev set C_CLOCAL.
I know since I added that in commit cda64188ca91 ("serdev: ttyport:
ignore carrier detect to avoid hangups") for this reason.
> So
> that only leave the hangup sent when the USB device is disconnected.
> But in this case, right after the hangup, the tty port device is
> removed, which in turn remove the serdev device. At this point there no
> way to comunicate with the tty anymore anyway, so I don't see what
> signaling the hangup to the serdev device right before it get removed
> would add.
You still have a window where the serdev driver is bound to a port after
its port has been torn down.
Johan
prev parent reply other threads:[~2026-10-02 14:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 8:11 Alban Bedel
2026-09-17 8:27 ` Greg Kroah-Hartman
2026-09-17 13:37 ` Alban Bedel
2026-09-17 14:08 ` Greg Kroah-Hartman
2026-09-17 15:21 ` Alban Bedel
2026-09-18 14:56 ` Johan Hovold
2026-09-21 15:37 ` Alban Bedel
2026-10-02 14:56 ` Johan Hovold [this message]
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=ar_GHJpNwit_wxkQ@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=alban.bedel@lht.dlh.de \
--cc=gregkh@linuxfoundation.org \
--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®