1
0
Fork 0
alistair23-linux/drivers/tty/serial/8250
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
..
8250.h
8250_accent.c
8250_acorn.c
8250_aspeed_vuart.c serial: 8250: Check UPF_IRQ_SHARED in advance 2020-02-28 17:22:19 +01:00
8250_bcm2835aux.c serial: 8250_bcm2835aux: Fix line mismatch on driver unbind 2020-02-01 09:34:34 +00:00
8250_boca.c
8250_core.c serial: 8250: fix null-ptr-deref in serial8250_start_tx() 2020-07-29 10:18:42 +02:00
8250_dma.c
8250_dw.c serial: 8250_dw: Avoid double error messaging when IRQ absent 2019-12-13 08:42:25 +01:00
8250_dwlib.c
8250_dwlib.h
8250_early.c
8250_em.c
8250_exar.c serial: 8250_exar: Fix number of ports for Commtech PCIe cards 2020-09-03 11:27:03 +02:00
8250_exar_st16c554.c
8250_fintek.c
8250_fourport.c
8250_fsl.c
8250_gsc.c
8250_hp300.c
8250_hub6.c
8250_ingenic.c
8250_lpc18xx.c
8250_lpss.c
8250_men_mcb.c
8250_mid.c
8250_mtk.c serial: 8250_mtk: Fix uart_get_baud_rate warning 2020-11-10 12:37:32 +01:00
8250_of.c serial: 8250: Check UPF_IRQ_SHARED in advance 2020-02-28 17:22:19 +01:00
8250_omap.c serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access 2020-12-21 13:27:06 +01:00
8250_pci.c serial: 8250_pci: Add Realtek 816a and 816b 2020-09-23 12:40:45 +02:00
8250_pnp.c
8250_port.c serial: 8250_port: Don't service RX FIFO if throttled 2020-10-01 13:17:46 +02:00
8250_pxa.c
8250_uniphier.c
Kconfig
Makefile
serial_cs.c