From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Oliver Neukum <oneukum@suse.com>,
Jiri Slaby <jirislaby@kernel.org>,
USB list <linux-usb@vger.kernel.org>,
linux-serial@vger.kernel.org
Subject: Re: question on correct error return from break_ctl()
Date: Thu, 30 Nov 2023 16:12:05 +0100 [thread overview]
Message-ID: <ZWimRdaCVvPjLsTL@hovoldconsulting.com> (raw)
In-Reply-To: <2023113053-oxidize-observant-9fb8@gregkh>
On Thu, Nov 30, 2023 at 02:42:20PM +0000, Greg Kroah-Hartman wrote:
> On Thu, Nov 30, 2023 at 03:36:21PM +0100, Oliver Neukum wrote:
> > On 30.11.23 14:48, Greg Kroah-Hartman wrote:
> > I am afraid I need to point out that usb-serial has been changed _this_ _year_
> > to return -ENOTTY. CDC-ACM being also in this situation unfortunately
> > I need to decide between one of the alternatives.
>
> Ah, oops, then it should probably be changed back. Unless Johan, any
> specific reason this was changed?
Had to go back to lore to see why I changed this:
https://lore.kernel.org/all/20230604123505.4661-1-johan@kernel.org/
IIRC we had a user that was not expecting break signalling to only work
with one of the two ports of a Silabs device without user space being
notified about it.
In the cover letter I mention that the intent of "commit 9e98966c7bb9
("tty: rework break handling") from 2008 appears to be to allow missing
support to be reported to user space".
Reporting back an error also avoids waiting for the break period when a
subdriver does not support break (i.e. as when a tty driver does not
support break).
The inconsistency was discussed and if this turns out to be an issue we
can have the tty layer turn that -ENOTTY into 0 before returning:
https://lore.kernel.org/all/ZH8a12ZYtA2RzEK_@hovoldconsulting.com/
I haven't heard from anyone noticing any issues so far though.
Johan
prev parent reply other threads:[~2023-11-30 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 13:09 question on correct error return from break_ctl() Oliver Neukum
2023-11-30 13:48 ` Greg Kroah-Hartman
2023-11-30 14:36 ` Oliver Neukum
2023-11-30 14:42 ` Greg Kroah-Hartman
2023-11-30 15:12 ` 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=ZWimRdaCVvPjLsTL@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
/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