1
0
Fork 0
alistair23-linux/drivers/tty
Alexander Sverdlin bb07f4c93e serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access
commit d96f04d347 upstream.

It has been observed that once per 300-1300 port openings the first
transmitted byte is being corrupted on AM3352 ("v" written to FIFO appeared
as "e" on the wire). It only happened if single byte has been transmitted
right after port open, which means, DMA is not used for this transfer and
the corruption never happened afterwards.

Therefore I've carefully re-read the MDR1 errata (link below), which says
"when accessing the MDR1 registers that causes a dummy under-run condition
that will freeze the UART in IrDA transmission. In UART mode, this may
corrupt the transferred data". Strictly speaking,
omap_8250_mdr1_errataset() performs a read access and if the value is the
same as should be written, exits without errata-recommended FIFO reset.

A brief check of the serial_omap_mdr1_errataset() from the competing
omap-serial driver showed it has no read access of MDR1. After removing the
read access from omap_8250_mdr1_errataset() the data corruption never
happened any more.

Link: https://www.ti.com/lit/er/sprz360i/sprz360i.pdf
Fixes: 61929cf016 ("tty: serial: Add 8250-core based omap driver")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/20201210055257.1053028-1-alexander.sverdlin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-21 13:27:06 +01:00
..
hvc tty: hvcs: Don't NULL tty->driver_data until hvcs_cleanup() 2020-10-29 09:57:38 +01:00
ipwireless tty: ipwireless: fix error handling 2020-10-29 09:58:08 +01:00
serdev serdev: ttyport: restore client ops on deregistration 2020-02-28 17:22:19 +01:00
serial serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access 2020-12-21 13:27:06 +01:00
vt vt: Disable KD_FONT_OP_COPY 2020-11-10 12:37:31 +01:00
Kconfig
Makefile
amiserial.c
cyclades.c
ehv_bytechan.c tty: evh_bytechan: Fix out of bounds accesses 2020-04-23 10:36:44 +02:00
goldfish.c
isicom.c
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Fix bogus i++ in gsm_data_kick 2020-06-24 17:50:29 +02:00
n_hdlc.c
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c
pty.c pty: do tty_flip_buffer_push without port->lock in pty_write 2020-10-29 09:57:38 +01:00
rocket.c tty: rocket, avoid OOB access 2020-04-29 16:33:17 +02:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c tty: synclink_gt: Adjust indentation in several functions 2020-02-24 08:36:47 +01:00
synclinkmp.c tty: synclinkmp: Adjust indentation in several functions 2020-02-24 08:36:47 +01:00
sysrq.c
tty_audit.c
tty_baudrate.c
tty_buffer.c
tty_io.c tty: Fix ->session locking 2020-12-11 13:23:28 +01:00
tty_ioctl.c
tty_jobctrl.c tty: Fix ->session locking 2020-12-11 13:23:28 +01:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c serdev: ttyport: restore client ops on deregistration 2020-02-28 17:22:19 +01:00
ttynull.c
vcc.c sparc64: vcc: Fix error return code in vcc_probe() 2020-10-01 13:17:57 +02:00