mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
serial: 8250_port: fix dma tx issue on rockchip
Fixes: e8ffbb71f7 ("serial: 8250: use THRE & __stop_tx also with DMA")
Change-Id: I8c30f0413a3ff7f9f36ee089ee1be5f3f4a0d045
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
@@ -2001,9 +2001,12 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
|
||||
#endif
|
||||
serial8250_modem_status(up);
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
if ((!up->dma || (up->dma && (!up->dma->txchan || up->dma->tx_err))) &&
|
||||
((iir & 0xf) == UART_IIR_THRI))
|
||||
serial8250_tx_chars(up);
|
||||
if ((iir & 0xf) == UART_IIR_THRI) {
|
||||
if (!up->dma || (up->dma && (!up->dma->txchan || up->dma->tx_err)))
|
||||
serial8250_tx_chars(up);
|
||||
else if (!up->dma->tx_running)
|
||||
__stop_tx(up);
|
||||
}
|
||||
#else
|
||||
if ((status & UART_LSR_THRE) && (up->ier & UART_IER_THRI)) {
|
||||
if (!up->dma || up->dma->tx_err)
|
||||
|
||||
Reference in New Issue
Block a user