linux/drivers/tty/serial
Geert Uytterhoeven 62570d2476 serial: sh-sci: Fix race condition causing garbage during shutdown
[ Upstream commit 1cf4a7efdc ]

If DMA is enabled and used, a burst of old data may be seen on the
serial console during "poweroff" or "reboot".  uart_flush_buffer()
clears the circular buffer, but sci_port.tx_dma_len is not reset.
This leads to a circular buffer overflow, dumping (UART_XMIT_SIZE -
sci_port.tx_dma_len) bytes.

To fix this, add a .flush_buffer() callback that resets
sci_port.tx_dma_len.

Inspired by commit 31ca2c63fd ("tty/serial: atmel: fix race
condition (TX+DMA)").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-13 19:50:07 +02:00
..
8250 serial: 8250: omap: Disable DMA for console UART 2018-04-13 19:50:07 +02:00
cpm_uart
jsm
21285.c
68328serial.c
altera_jtaguart.c
altera_uart.c
amba-pl010.c
amba-pl011.c
apbuart.c
apbuart.h
ar933x_uart.c
arc_uart.c
atmel_serial.c tty/serial: atmel: add new version check for usart 2018-03-18 11:17:53 +01:00
bcm63xx_uart.c
bfin_sport_uart.c
bfin_sport_uart.h
bfin_uart.c
clps711x.c
crisv10.c
crisv10.h
digicolor-usart.c
dz.c
dz.h
earlycon-arm-semihost.c
earlycon.c
efm32-uart.c serial: efm32: Fix parity management in 'efm32_uart_console_get_options()' 2017-06-26 07:13:09 +02:00
etraxfs-uart.c
fsl_lpuart.c
icom.c
icom.h
ifx6x60.c serial: ifx6x60: fix use-after-free on module unload 2017-06-14 13:16:20 +02:00
ifx6x60.h
imx.c serial: imx: Only wakeup via RTSDEN bit if the system has RTS/CTS 2018-02-03 17:04:30 +01:00
ioc3_serial.c
ioc4_serial.c
ip22zilog.c
ip22zilog.h
Kconfig
kgdb_nmi.c
kgdboc.c
lantiq.c
lpc32xx_hs.c
m32r_sio_reg.h
m32r_sio.c
m32r_sio.h
Makefile
max310x.c
max3100.c
mcf.c
men_z135_uart.c
meson_uart.c
mpc52xx_uart.c
mpsc.c
msm_serial.c tty: serial: msm: Fix module autoload 2017-02-26 11:07:50 +01:00
msm_serial.h
mux.c
mxs-auart.c
netx-serial.c
nwpserial.c
of_serial.c
omap-serial.c serial: omap: Fix EFR write on RTS deassertion 2017-11-24 08:32:24 +01:00
pch_uart.c
pmac_zilog.c
pmac_zilog.h
pnx8xxx_uart.c
pxa.c
rp2.c
sa1100.c
samsung.c serial: samsung: Use right device for DMA-mapping calls 2017-05-20 14:27:02 +02:00
samsung.h
sb1250-duart.c
sc16is7xx.c
sccnxp.c
serial_core.c
serial_ks8695.c
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_txx9.c
serial-tegra.c
sh-sci.c serial: sh-sci: Fix race condition causing garbage during shutdown 2018-04-13 19:50:07 +02:00
sh-sci.h
sirfsoc_uart.c
sirfsoc_uart.h
sn_console.c
sprd_serial.c
st-asc.c
stm32-usart.c
suncore.c
sunhv.c sparc64: Migrate hvcons irq to panicked cpu 2017-10-21 17:09:05 +02:00
sunsab.c
sunsab.h
sunsu.c
sunzilog.c
sunzilog.h
tilegx.c
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c
zs.c
zs.h