TTY/Serial fixes for 5.10-rc3
Here are a small number of small tty and serial fixes for some reported problems for the tty core, vt code, and some serial drivers. They include fixes for: - a buggy and obsolete vt font ioctl removal - 8250_mtk serial baudrate runtime warnings - imx serial earlycon build configuration fix - txx9 serial driver error path cleanup issues - tty core fix in release_tty that can be triggered by trying to bind an invalid serial port name to a speakup console device Almost all of these have been in linux-next without any problems, the only one that hasn't, just deletes code :) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCX6g7nQ8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+ymmVACeNXgZpIAUJujtM7hQAEpCDYrFZ08An13TN07Y wZe5okUITYIXQRZevKyi =w0og -----END PGP SIGNATURE----- Merge tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are a small number of small tty and serial fixes for some reported problems for the tty core, vt code, and some serial drivers. They include fixes for: - a buggy and obsolete vt font ioctl removal - 8250_mtk serial baudrate runtime warnings - imx serial earlycon build configuration fix - txx9 serial driver error path cleanup issues - tty core fix in release_tty that can be triggered by trying to bind an invalid serial port name to a speakup console device Almost all of these have been in linux-next without any problems, the only one that hasn't, just deletes code :)" * tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: Disable KD_FONT_OP_COPY tty: fix crash in release_tty if tty->port is not set serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init tty: serial: imx: enable earlycon by default if IMX_SERIAL_CONSOLE is enabled serial: 8250_mtk: Fix uart_get_baud_rate warning
This commit is contained in:
Коммит
bbc821849e
|
@ -317,7 +317,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||||
*/
|
*/
|
||||||
baud = tty_termios_baud_rate(termios);
|
baud = tty_termios_baud_rate(termios);
|
||||||
|
|
||||||
serial8250_do_set_termios(port, termios, old);
|
serial8250_do_set_termios(port, termios, NULL);
|
||||||
|
|
||||||
tty_termios_encode_baud_rate(termios, baud, baud);
|
tty_termios_encode_baud_rate(termios, baud, baud);
|
||||||
|
|
||||||
|
|
|
@ -522,6 +522,7 @@ config SERIAL_IMX_EARLYCON
|
||||||
depends on OF
|
depends on OF
|
||||||
select SERIAL_EARLYCON
|
select SERIAL_EARLYCON
|
||||||
select SERIAL_CORE_CONSOLE
|
select SERIAL_CORE_CONSOLE
|
||||||
|
default y if SERIAL_IMX_CONSOLE
|
||||||
help
|
help
|
||||||
If you have enabled the earlycon on the Freescale IMX
|
If you have enabled the earlycon on the Freescale IMX
|
||||||
CPU you can make it the earlycon by answering Y to this option.
|
CPU you can make it the earlycon by answering Y to this option.
|
||||||
|
|
|
@ -1280,6 +1280,9 @@ static int __init serial_txx9_init(void)
|
||||||
|
|
||||||
#ifdef ENABLE_SERIAL_TXX9_PCI
|
#ifdef ENABLE_SERIAL_TXX9_PCI
|
||||||
ret = pci_register_driver(&serial_txx9_pci_driver);
|
ret = pci_register_driver(&serial_txx9_pci_driver);
|
||||||
|
if (ret) {
|
||||||
|
platform_driver_unregister(&serial_txx9_plat_driver);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -1515,10 +1515,12 @@ static void release_tty(struct tty_struct *tty, int idx)
|
||||||
tty->ops->shutdown(tty);
|
tty->ops->shutdown(tty);
|
||||||
tty_save_termios(tty);
|
tty_save_termios(tty);
|
||||||
tty_driver_remove_tty(tty->driver, tty);
|
tty_driver_remove_tty(tty->driver, tty);
|
||||||
tty->port->itty = NULL;
|
if (tty->port)
|
||||||
|
tty->port->itty = NULL;
|
||||||
if (tty->link)
|
if (tty->link)
|
||||||
tty->link->port->itty = NULL;
|
tty->link->port->itty = NULL;
|
||||||
tty_buffer_cancel_work(tty->port);
|
if (tty->port)
|
||||||
|
tty_buffer_cancel_work(tty->port);
|
||||||
if (tty->link)
|
if (tty->link)
|
||||||
tty_buffer_cancel_work(tty->link->port);
|
tty_buffer_cancel_work(tty->link->port);
|
||||||
|
|
||||||
|
|
|
@ -4704,27 +4704,6 @@ static int con_font_default(struct vc_data *vc, struct console_font_op *op)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int con_font_copy(struct vc_data *vc, struct console_font_op *op)
|
|
||||||
{
|
|
||||||
int con = op->height;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
|
|
||||||
console_lock();
|
|
||||||
if (vc->vc_mode != KD_TEXT)
|
|
||||||
rc = -EINVAL;
|
|
||||||
else if (!vc->vc_sw->con_font_copy)
|
|
||||||
rc = -ENOSYS;
|
|
||||||
else if (con < 0 || !vc_cons_allocated(con))
|
|
||||||
rc = -ENOTTY;
|
|
||||||
else if (con == vc->vc_num) /* nothing to do */
|
|
||||||
rc = 0;
|
|
||||||
else
|
|
||||||
rc = vc->vc_sw->con_font_copy(vc, con);
|
|
||||||
console_unlock();
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
int con_font_op(struct vc_data *vc, struct console_font_op *op)
|
int con_font_op(struct vc_data *vc, struct console_font_op *op)
|
||||||
{
|
{
|
||||||
switch (op->op) {
|
switch (op->op) {
|
||||||
|
@ -4735,7 +4714,8 @@ int con_font_op(struct vc_data *vc, struct console_font_op *op)
|
||||||
case KD_FONT_OP_SET_DEFAULT:
|
case KD_FONT_OP_SET_DEFAULT:
|
||||||
return con_font_default(vc, op);
|
return con_font_default(vc, op);
|
||||||
case KD_FONT_OP_COPY:
|
case KD_FONT_OP_COPY:
|
||||||
return con_font_copy(vc, op);
|
/* was buggy and never really used */
|
||||||
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче