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:
Huibin Hong
2024-05-21 11:11:53 +08:00
committed by Tao Huang
parent 171188308c
commit 9fbcb7ca5b

View File

@@ -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)