alistair23-linux/drivers/tty
Vignesh R a1bfb6eb30 serial: 8250: 8250_omap: Fix race b/w dma completion and RX timeout
DMA RX completion handler for UART is called from a tasklet and hence
may be delayed depending on the system load. In meanwhile, there may be
RX timeout interrupt which can get serviced first before DMA RX
completion handler is executed for the completed transfer.
omap_8250_rx_dma_flush() which is called on RX timeout interrupt makes
sure that the DMA RX buffer is pushed and then the FIFO is drained and
also queues a new DMA request. But, when DMA RX completion handler
executes, it will erroneously flush the currently queued DMA transfer
which sometimes results in data corruption and double queueing of DMA RX
requests.

Fix this by checking whether RX completion is for the currently queued
transfer or not. And also hold port lock when in DMA completion to avoid
race wrt RX timeout handler preempting it.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 17:03:10 +02:00
..
hvc drivers/tty/hvc: fix spelling mistake: "missmanaged" -> "mismanaged" 2017-05-18 16:34:55 +02:00
ipwireless
serdev Merge 4.12-rc3 into tty-next 2017-05-29 08:18:15 +02:00
serial serial: 8250: 8250_omap: Fix race b/w dma completion and RX timeout 2017-06-29 17:03:10 +02:00
vt vt: fix \e[2m using the wrong placeholder color on graphical consoles 2017-06-09 11:20:08 +02:00
amiserial.c tty: amiserial: drop broken alt-speed support 2017-06-13 11:49:58 +02:00
bfin_jtag_comm.c
cyclades.c tty: cyclades: drop broken alt-speed support 2017-06-13 11:49:58 +02:00
ehv_bytechan.c tty: ehv_bytechan: clean up init error handling 2017-05-18 16:43:55 +02:00
goldfish.c
isicom.c
Kconfig
Makefile tty: handle the case where we cannot restore a line discipline 2017-06-03 18:43:46 +09:00
metag_da.c
mips_ejtag_fdc.c
moxa.c Annotate hardware config module parameters in drivers/tty/ 2017-04-20 12:02:32 +01:00
moxa.h
mxser.c Annotate hardware config module parameters in drivers/tty/ 2017-04-20 12:02:32 +01:00
mxser.h
n_gsm.c tty: n_gsm: do not send/receive in ldisc close path 2017-06-03 18:48:52 +09:00
n_hdlc.c format-security: move static strings to const 2017-05-08 17:15:14 -07:00
n_null.c tty: handle the case where we cannot restore a line discipline 2017-06-03 18:43:46 +09:00
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c
pty.c tty: add TIOCGPTPEER ioctl 2017-06-09 12:27:54 +02:00
rocket.c tty: rocket: drop broken alt-speed support 2017-06-13 11:49:58 +02:00
rocket.h
rocket_int.h
synclink.c Annotate hardware config module parameters in drivers/tty/ 2017-04-20 12:02:32 +01:00
synclink_gt.c
synclinkmp.c
sysrq.c oom: improve oom disable handling 2017-05-03 15:52:10 -07:00
tty_audit.c
tty_baudrate.c tty: move baudrate handling code to a file of its own 2017-04-18 18:01:52 +02:00
tty_buffer.c
tty_io.c tty: fix comment for __tty_alloc_driver() 2017-04-24 13:15:39 +02:00
tty_ioctl.c tty: move baudrate handling code to a file of its own 2017-04-18 18:01:52 +02:00
tty_jobctrl.c tty: split job control support into a file of its own 2017-04-18 18:01:52 +02:00
tty_ldisc.c tty: handle the case where we cannot restore a line discipline 2017-06-03 18:43:46 +09:00
tty_ldsem.c
tty_mutex.c
tty_port.c Revert "tty: fix port buffer locking" 2017-06-04 10:23:25 +02:00