From: John Keeping Date: Mon, 24 Feb 2025 12:18:30 +0000 (+0000) Subject: serial: 8250_dma: terminate correct DMA in tx_dma_flush() X-Git-Tag: v6.15-rc1~47^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a26503092c75abba70a0be2aa01145ecf90c2a22;p=thirdparty%2Fkernel%2Flinux.git serial: 8250_dma: terminate correct DMA in tx_dma_flush() When flushing transmit side DMA, it is the transmit channel that should be terminated, not the receive channel. Fixes: 9e512eaaf8f40 ("serial: 8250: Fix fifo underflow on flush") Cc: stable Reported-by: Wentao Guan Signed-off-by: John Keeping Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20250224121831.1429323-1-jkeeping@inmusicbrands.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c index f245a84f4a508..bdd26c9f34bdf 100644 --- a/drivers/tty/serial/8250/8250_dma.c +++ b/drivers/tty/serial/8250/8250_dma.c @@ -162,7 +162,7 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p) */ dma->tx_size = 0; - dmaengine_terminate_async(dma->rxchan); + dmaengine_terminate_async(dma->txchan); } int serial8250_rx_dma(struct uart_8250_port *p)