Re: [PATCH 6/8] usb: gadget: f_acm: add an ioctl to get the current line coding

From: Alan Cox
Date: Tue Jun 13 2017 - 21:15:41 EST


On Mon, 12 Jun 2017 20:26:13 +0300
Tal Shorer <tal.shorer@xxxxxxxxx> wrote:

> The user can issue USB_F_GET_LINE_CODING to get the current line coding
> as set by the host (or the default if unset yet).

No this is not how to do it. We don't want weirdass ioctls for each
different tty device type.

There are two ways this can work. The first is actually done by plenty of
real physical hardware and that is to simply update the termios of the
logical channel to reflect the settings negotiated by the link layer
below (in your course USB ACM).

If that isn't sufficient then implement an ioctl that could work for *ALL*
tty devices - for example return a termios structure indicating the
relevant values on top of the current tty termios settings not some USB
ACM magic object.

Alan