Re: USB cdc-acm driver: break and command

From: Oliver Neukum
Date: Thu Jul 17 2025 - 07:32:18 EST


On 16.07.25 19:30, H. Peter Anvin wrote:
ERRORS

The tcsendbreak() function shall fail if:

[EBADF]
The fildes argument is not a valid file descriptor.
[EIO]
The process group of the writing process is orphaned, the
calling thread is not blocking SIGTTOU, and the process is not ignoring
SIGTTOU.
[ENOTTY]
The file associated with fildes is not a terminal.

I would take this as meaning that we cannot just return -EBUSY or -EWOULDBLOCK.
Hence the generic layer would need to implement some sort of waiting
logic.

That's why I said if that is what is needed, it really belongs in the
tty core. That's where the current internal delay is, after all.

Good. Don't get me wrong. I'd love to do this more efficiently,
but the current API is less than optimal.

Regards
Oliver