[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181204161518.GA17941@kroah.com>
Date: Tue, 4 Dec 2018 17:15:18 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Johan Hovold <johan@...nel.org>
Cc: linux-usb@...r.kernel.org,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Jiri Slaby <jslaby@...e.com>, linux-kernel@...r.kernel.org,
stable <stable@...r.kernel.org>,
Florian Zumbiehl <florz@...rz.de>
Subject: Re: [PATCH] USB: serial: console: fix reported terminal settings
On Tue, Dec 04, 2018 at 05:00:36PM +0100, Johan Hovold wrote:
> The USB-serial console implementation has never reported the actual
> terminal settings used. Despite storing the corresponding cflags in its
> struct console, this was never honoured on later tty open() where the
> tty termios would be left initialised to the driver defaults.
>
> Unlike the serial console implementation, the USB-serial code calls
> subdriver open() already at console setup. While calling set_termios()
> before open() looks like it could work for some USB-serial drivers,
> others definitely do not expect this, so modelling this after serial
> core is going to be intrusive, if at all possible.
>
> Instead, use a (renamed) tty helper to save the termios data used at
> console setup, so that the tty termios reflects the actual terminal
> settings after a subsequent tty open().
>
> Note that the calls to tty_init_termios() (tty_driver_install()) and
> tty_save_termios() are serialised using the disconnect mutex.
>
> This specifically fixes a regression that was triggered by a recent
> change adding software flow control to the pl2303 driver: a getty trying
> to disable flow control while leaving the baud rate unchanged would now
> also set the baud rate to the driver default (prior to the flow-control
> change this had been a noop).
>
> Fixes: 7041d9c3f01b ("USB: serial: pl2303: add support for tx xon/xoff flow control")
> Cc: stable <stable@...r.kernel.org> # 4.18
> Reported-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
> Cc: Florian Zumbiehl <florz@...rz.de>
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
> drivers/tty/tty_io.c | 11 +++++++++--
> drivers/usb/serial/console.c | 2 +-
> include/linux/tty.h | 1 +
> 3 files changed, 11 insertions(+), 3 deletions(-)
Ah, messy :)
Want me to take this through my tty tree?
thanks,
greg k-h
Powered by blists - more mailing lists