Re: USB cdc-acm driver: break and command

From: Oliver Neukum
Date: Thu Jul 17 2025 - 07:28:23 EST


On 16.07.25 19:49, H. Peter Anvin wrote:
On 2025-07-16 09:17, Oliver Neukum wrote:

Understood. It still seems dirty to me. If you want to send strings to a
device
the proper way is to use a device node and write().

There is definitely something to be said for that; or at least a file
descriptor. We do have cases in the kernel -- notably opening the pts
corresponding to a ptmx file descriptor -- that do that sort of
"auxiliary open" kind of thing.

The big question is how that interacts with the rest of the ACM driver,
as well as all the lifetime issues you mentioned elsewhere.

It would seem to me that CDC already has something very similar in form
of CDC-WDM. If acm_probe() can call tty_port_register_device(), it can also
register a secondary character device. Or are you worried about how to tell
user space which devices belong together?

Regards
Oliver