mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 09:59:59 +07:00
TTY/Serial fixes for 5.1-rc6
Here are 5 small fixes for some tty/serial/vt issues that have been reported. The vt one has been around for a while, it is good to finally get that resolved. The others fix a build warning that showed up in 5.1-rc1, and resolve a problem in the sh-sci driver. Note, the second patch for build warning fix for the sc16is7xx driver was just applied to the tree, as it resolves a problem with the previous patch to try to solve the issue. It has not shown up in linux-next yet, unlike all of the other patches, but it has passed 0-day testing and everyone seems to agree that it is correct. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXLoeMg8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yll3gCfdfclnKAQt7UnXUZccT7f6oebB6gAoLEy0NEi lDl7inafWImRKCRq1+zw =Qk9s -----END PGP SIGNATURE----- Merge tag 'tty-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are five small fixes for some tty/serial/vt issues that have been reported. The vt one has been around for a while, it is good to finally get that resolved. The others fix a build warning that showed up in 5.1-rc1, and resolve a problem in the sh-sci driver. Note, the second patch for build warning fix for the sc16is7xx driver was just applied to the tree, as it resolves a problem with the previous patch to try to solve the issue. It has not shown up in linux-next yet, unlike all of the other patches, but it has passed 0-day testing and everyone seems to agree that it is correct" * tag 'tty-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: sc16is7xx: put err_spi and err_i2c into correct #ifdef vt: fix cursor when clearing the screen sc16is7xx: move label 'err_spi' to correct section serial: sh-sci: Fix HSCIF RX sampling point adjustment serial: sh-sci: Fix HSCIF RX sampling point calculation
This commit is contained in:
commit
55e3a6ba5c
@ -1520,11 +1520,13 @@ static int __init sc16is7xx_init(void)
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_SPI
|
||||
err_spi:
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_SC16IS7XX_I2C
|
||||
i2c_del_driver(&sc16is7xx_i2c_uart_driver);
|
||||
#endif
|
||||
err_i2c:
|
||||
#endif
|
||||
uart_unregister_driver(&sc16is7xx_uart);
|
||||
return ret;
|
||||
}
|
||||
|
@ -2512,14 +2512,16 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||
* center of the last stop bit in sampling clocks.
|
||||
*/
|
||||
int last_stop = bits * 2 - 1;
|
||||
int deviation = min_err * srr * last_stop / 2 / baud;
|
||||
int deviation = DIV_ROUND_CLOSEST(min_err * last_stop *
|
||||
(int)(srr + 1),
|
||||
2 * (int)baud);
|
||||
|
||||
if (abs(deviation) >= 2) {
|
||||
/* At least two sampling clocks off at the
|
||||
* last stop bit; we can increase the error
|
||||
* margin by shifting the sampling point.
|
||||
*/
|
||||
int shift = min(-8, max(7, deviation / 2));
|
||||
int shift = clamp(deviation / 2, -8, 7);
|
||||
|
||||
hssrr |= (shift << HSCIF_SRHP_SHIFT) &
|
||||
HSCIF_SRHP_MASK;
|
||||
|
@ -1520,7 +1520,8 @@ static void csi_J(struct vc_data *vc, int vpar)
|
||||
return;
|
||||
}
|
||||
scr_memsetw(start, vc->vc_video_erase_char, 2 * count);
|
||||
update_region(vc, (unsigned long) start, count);
|
||||
if (con_should_update(vc))
|
||||
do_update_region(vc, (unsigned long) start, count);
|
||||
vc->vc_need_wrap = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user