linux-brain/drivers/tty
Kazuhiro Fujita d407f7dc06 serial: sh-sci: Make sure status register SCxSR is read in correct sequence
commit 3dc4db3662366306e54ddcbda4804acb1258e4ba upstream.

For SCIF and HSCIF interfaces the SCxSR register holds the status of
data that is to be read next from SCxRDR register, But where as for
SCIFA and SCIFB interfaces SCxSR register holds status of data that is
previously read from SCxRDR register.

This patch makes sure the status register is read depending on the port
types so that errors are caught accordingly.

Cc: <stable@vger.kernel.org>
Signed-off-by: Kazuhiro Fujita <kazuhiro.fujita.jg@renesas.com>
Signed-off-by: Hao Bui <hao.bui.yg@renesas.com>
Signed-off-by: KAZUMI HARADA <kazumi.harada.rh@renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/1585333048-31828-1-git-send-email-kazuhiro.fujita.jg@renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-29 16:31:34 +02:00
..
hvc tty: hvc: fix buffer overflow during hvc_alloc(). 2020-04-29 16:31:30 +02:00
ipwireless tty: ipwireless: Fix potential NULL pointer dereference 2020-01-27 14:50:16 +01:00
serdev serdev: ttyport: restore client ops on deregistration 2020-02-28 16:38:49 +01:00
serial serial: sh-sci: Make sure status register SCxSR is read in correct sequence 2020-04-29 16:31:34 +02:00
vt vt: don't use kmalloc() for the unicode screen buffer 2020-04-29 16:31:32 +02:00
amiserial.c
cyclades.c
ehv_bytechan.c tty: evh_bytechan: Fix out of bounds accesses 2020-04-23 10:30:23 +02:00
goldfish.c
isicom.c
Kconfig tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:38:47 +02:00
Makefile
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c tty: Don't block on IO when ldisc change is pending 2019-12-13 08:52:28 +01:00
n_null.c
n_r3964.c tty: Don't block on IO when ldisc change is pending 2019-12-13 08:52:28 +01:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: Don't block on IO when ldisc change is pending 2019-12-13 08:52:28 +01:00
nozomi.c
pty.c pty: fix compat ioctls 2019-12-01 09:16:16 +01:00
rocket_int.h
rocket.c tty: rocket, avoid OOB access 2020-04-29 16:31:30 +02:00
rocket.h
synclink_gt.c tty: synclink_gt: Adjust indentation in several functions 2020-02-24 08:34:47 +01:00
synclink.c
synclinkmp.c tty: synclinkmp: Adjust indentation in several functions 2020-02-24 08:34:47 +01:00
sysrq.c sysrq: Remove duplicated sysrq message 2020-03-05 16:42:15 +01:00
tty_audit.c
tty_baudrate.c termios, tty/tty_baudrate.c: fix buffer overrun 2018-11-21 09:19:20 +01:00
tty_buffer.c tty: increase the default flip buffer limit to 2*640K 2019-04-05 22:33:13 +02:00
tty_io.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-04-17 08:38:47 +02:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: Don't block on IO when ldisc change is pending 2019-12-13 08:52:28 +01:00
tty_ldsem.c tty/ldsem, locking/rwsem: Add missing ACQUIRE to read_failed sleep loop 2019-08-16 10:12:50 +02:00
tty_mutex.c
tty_port.c serdev: ttyport: restore client ops on deregistration 2020-02-28 16:38:49 +01:00
vcc.c