]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
serial: 8250_dma: terminate correct DMA in tx_dma_flush()
authorJohn Keeping <jkeeping@inmusicbrands.com>
Mon, 24 Feb 2025 12:18:30 +0000 (12:18 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:56 +0000 (14:31 +0200)
commit a26503092c75abba70a0be2aa01145ecf90c2a22 upstream.

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 <stable@kernel.org>
Reported-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250224121831.1429323-1-jkeeping@inmusicbrands.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dma.c

index 7a92e3397908ef0141a5a5754874f7026ab22254..e3125f23044695b1cd20e0f7256d2bb8ac0d742f 100644 (file)
@@ -150,7 +150,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)