remarkable-linux/drivers/tty
Robert Baldyga 736cd79f48 serial: samsung: fix DMA for FIFO smaller than cache line size
So far DMA mode were activated when only number of bytes to send was
equal or greater than min_dma_size. Due to requirement that DMA transaction
buffer should be aligned to cache line size, the excessive bytes were
written to FIFO before starting DMA transaction. The problem occurred
when FIFO size were smaller than cache alignment, because writing all
excessive bytes to FIFO would fail. It happened in DMA mode when PIO
interrupts disabled, which caused driver hung.

The solution is to test if buffer is alligned to cache line size before
activating DMA mode, and if it's not, running PIO mode to align buffer
and then starting DMA transaction. In PIO mode, when interrupts are
enabled, lack of space in FIFO isn't the problem, so buffer aligning
will always finish with success.

Cc: <stable@vger.kernel.org> # v3.18+
Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-04 22:07:24 -07:00
..
hvc xen: features and cleanups for 4.2-rc0 2015-07-01 11:53:46 -07:00
ipwireless Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-04-14 09:50:27 -07:00
serial serial: samsung: fix DMA for FIFO smaller than cache line size 2015-08-04 22:07:24 -07:00
vt tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection() 2015-07-23 18:08:29 -07:00
amiserial.c tty: amiserial.c: move assignment out of if () block 2015-05-10 19:04:16 +02:00
bfin_jtag_comm.c TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation 2015-03-07 03:44:14 +01:00
cyclades.c tty: remove buf parameter from tty_name() 2015-05-06 22:26:57 +02:00
ehv_bytechan.c tty: remove unused variable sprop 2015-02-03 15:52:13 -08:00
goldfish.c staging: goldfish: Fix pointer cast for 32 bits 2015-05-31 11:40:14 +09:00
isicom.c tty/isicom: fix big-endian compile warning 2015-02-02 10:11:25 -08:00
Kconfig ttyFDC: Implement KGDB IO operations. 2015-03-31 12:04:13 +02:00
Makefile TTY: Add MIPS EJTAG Fast Debug Channel TTY driver 2015-03-31 12:04:12 +02:00
metag_da.c tty/metag_da: Avoid module_init/module_exit in non-modular code 2015-06-16 14:12:31 -04:00
mips_ejtag_fdc.c ttyFDC: Fix to use native endian MMIO reads 2015-05-26 16:46:52 +02:00
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: Convert use of __constant_htons to htons 2015-07-23 15:10:25 -07:00
n_hdlc.c pty: Fix input race when closing 2015-05-10 19:26:37 +02:00
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c Merge 4.2-rc4 into tty-next 2015-07-27 11:12:39 -07:00
nozomi.c drivers/tty/nozomi.c: rename CONFIG_MAGIC 2015-05-10 19:19:06 +02:00
pty.c pty: Add debug message for ptmx open 2015-07-23 18:37:32 -07:00
rocket.c TTY: fix misspelling of current function in string 2015-01-09 14:38:15 -08:00
rocket.h tty: rocket: fix comment of ROCKET_SPD_HI 2015-05-24 12:49:16 -07:00
rocket_int.h
synclink.c tty: synclink.c: move assignment out of if () block 2015-05-10 19:04:18 +02:00
synclink_gt.c tty: synclink_gt.c: move assignment out of if () block 2015-05-10 19:04:18 +02:00
synclinkmp.c tty: synclinkmp.c: move assignment out of if () block 2015-05-10 19:04:18 +02:00
sysrq.c Minor merge needed, due to function move. 2015-07-01 10:49:25 -07:00
tty_audit.c
tty_buffer.c tty: buffers: Move hidden buffer index advance into outer loop 2015-07-23 18:23:56 -07:00
tty_io.c Avoid usb reset crashes by making tty_io cdevs truly dynamic 2015-08-03 15:24:43 -07:00
tty_ioctl.c tty: Replace inline #ifdef TTY_DEBUG_WAIT_UNTIL_SENT 2015-07-23 18:37:31 -07:00
tty_ldisc.c tty: core: Improve ldisc debug messages 2015-07-23 18:37:31 -07:00
tty_ldsem.c tty: tty_ldsem.c: move assignment out of if () block 2015-05-10 19:04:18 +02:00
tty_mutex.c tty: Make lock subclasses available for other tty locks 2015-02-02 10:11:27 -08:00
tty_port.c