linux/drivers/tty/serial
Stefan Agner 8e4934c6d6 tty: serial: fsl_lpuart: clear receive flag on FIFO flush
When the receiver was enabled during startup, a character could
have been in the FIFO when the UART get initially used. The
driver configures the (receive) watermark level, and flushes the
FIFO. However, the receive flag (RDRF) could still be set at that
stage (as mentioned in the register description of UARTx_RWFIFO).
This leads to an interrupt which won't be handled properly in
interrupt mode: The receive interrupt function lpuart_rxint checks
the FIFO count, which is 0 at that point (due to the flush
during initialization). The problem does not manifest when using
DMA to receive characters.

Fix this situation by explicitly read the status register, which
leads to clearing of the RDRF flag. Due to the flush just after
the status flag read, a explicit data read is not to required.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 23:13:14 +01:00
..
8250 serial: 8250_dw: Fix deadlock in LCR workaround 2015-03-11 16:39:52 +01:00
cpm_uart Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
jsm
21285.c
68328serial.c
altera_jtaguart.c serial: altera-juart: fix NULL device in log message 2015-01-09 14:28:17 -08:00
altera_uart.c serial: altera-uart: fix NULL device in log message 2015-01-09 14:28:17 -08:00
amba-pl010.c
amba-pl011.c
apbuart.c
apbuart.h
ar933x_uart.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
arc_uart.c
atmel_serial.c tty: serial: atmel: rework interrupt and wakeup handling 2015-03-06 00:46:44 +01:00
bcm63xx_uart.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
bfin_sport_uart.c
bfin_sport_uart.h
bfin_uart.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
clps711x.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
crisv10.c
crisv10.h
digicolor-usart.c tty/serial: digicolor: remove sysrq reference 2015-02-02 10:11:25 -08:00
dz.c
dz.h
earlycon-arm-semihost.c
earlycon.c
efm32-uart.c
etraxfs-uart.c serial: driver for ETRAX FS UART 2015-02-07 18:43:16 +08:00
fsl_lpuart.c tty: serial: fsl_lpuart: clear receive flag on FIFO flush 2015-03-26 23:13:14 +01:00
icom.c
icom.h
ifx6x60.c
ifx6x60.h
imx.c serial: imx: Fix imx_flush_buffer() 2015-02-02 10:11:24 -08:00
ioc3_serial.c
ioc4_serial.c
ip22zilog.c
ip22zilog.h
Kconfig Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
kgdb_nmi.c
kgdboc.c
lantiq.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
lpc32xx_hs.c
m32r_sio_reg.h
m32r_sio.c
m32r_sio.h
Makefile serial: driver for ETRAX FS UART 2015-02-07 18:43:16 +08:00
max310x.c
max3100.c
mcf.c serial: mcf: fix no driver name in probe output 2015-01-09 14:06:57 -08:00
men_z135_uart.c tty: serial: men_z135_uart: Fix driver for changes in hardware 2015-02-02 10:11:27 -08:00
meson_uart.c
mfd.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
mpc52xx_uart.c
mpsc.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
msm_serial_hs.c More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
msm_serial.c tty: serial: msm_serial: Remove console unregistration from driver exit. 2015-02-02 10:11:25 -08:00
msm_serial.h
msm_smd_tty.c
mux.c
mxs-auart.c serial: mxs-auart: Remove unneeded zeroing of 'ret' 2015-02-02 10:11:25 -08:00
netx-serial.c
nwpserial.c
of_serial.c Revert "tty/serial: of_serial: add DT alias ID handling" 2015-03-07 03:06:51 +01:00
omap-serial.c serial: omap: Fix RTS handling 2015-02-02 10:11:28 -08:00
pch_uart.c
pmac_zilog.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pmac_zilog.h
pnx8xxx_uart.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
pxa.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
rp2.c
sa1100.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
samsung.c serial: samsung: Clear operation mode on UART shutdown 2015-03-26 23:13:14 +01:00
samsung.h serial: samsung: add DMA support for RX 2015-01-09 14:25:39 -08:00
sb1250-duart.c
sc16is7xx.c
sccnxp.c
serial_core.c serial: core: Rework hw-assisted flow control support 2015-02-02 10:11:28 -08:00
serial_ks8695.c
serial_mctrl_gpio.c
serial_mctrl_gpio.h
serial_txx9.c
serial-tegra.c
sh-sci.c serial: sh-sci: Fix R-Car SCIF and HSCIF overrun handling 2015-02-02 10:11:26 -08:00
sh-sci.h
sirfsoc_uart.c serial: sirf: rename marco to atlas7 2015-01-09 14:17:59 -08:00
sirfsoc_uart.h serial: sirf: rename marco to atlas7 2015-01-09 14:17:59 -08:00
sn_console.c
sprd_serial.c serial: sprd: Fix missing spin_unlock in sprd_handle_irq() 2015-03-07 03:39:55 +01:00
st-asc.c
suncore.c
sunhv.c
sunsab.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sunsab.h
sunsu.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sunzilog.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
sunzilog.h
tilegx.c
timbuart.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
timbuart.h
uartlite.c
ucc_uart.c
vr41xx_siu.c
vt8500_serial.c
xilinx_uartps.c tty: xuartps: Fix RX hang, and TX corruption in termios call 2015-02-02 10:11:25 -08:00
zs.c
zs.h