]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250: use THRE & __stop_tx also with DMA
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 25 Apr 2022 14:33:59 +0000 (17:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 11:28:34 +0000 (13:28 +0200)
commit1ebc930455b8c88e8a589bb9a54621527044e7af
tree2b9654e63eccf780ee364bdfc84d02f81d7a2634
parentcf5023c57065f05cf9271194ca9f78eafd498602
serial: 8250: use THRE & __stop_tx also with DMA

8250 DMA tx complete path lacks calls to normal 8250 stop handling. It
does not use THRE to detect true completion of the tx and also doesn't
call __stop_tx. This leads to problems with em485 that needs to handle
RTS timing.

Instead of handling tx stop internally within 8250 dma code, enable
THRE when tx'able data runs out and tweak serial8250_handle_irq to call
only __stop_tx when uart is using DMA.

It also seems bit early to call serial8250_rpm_put_tx from there while
tx is still underway(?).

Tested-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220425143410.12703-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dma.c
drivers/tty/serial/8250/8250_port.c