Re: question on correct error return from break_ctl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx/

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_@xxxxxxxxxxxxxxxxxxxx/

I haven't heard from anyone noticing any issues so far though.

Johan




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux