[PATCH 1/2] tty: serial: samsung: pause the RX DMA channel in stop_rx

Marek Szyprowski m.szyprowski at samsung.com
Fri Nov 6 02:08:59 PST 2026


On 31.10.2026 01:42, Samarth Narang wrote:
> In s3c24xx_serial_stop_rx(), the driver pauses dma->tx_chan before
> reading the residue of the RX transfer on dma->rx_chan to determine how
> many bytes have been received. Since pausing the TX channel does not
> stop RX DMA, additional bytes may arrive before the RX channel is
> terminated, causing them to be omitted from the data passed to the tty.
> This also unnecessarily pauses an active TX transfer, which the driver
> does not subsequently resume.
>
> Pause the RX channel instead, following the existing handling in
> s3c24xx_serial_rx_chars_dma() on the RX timeout path.
>
> Fixes: b543c301c2c5 ("serial: samsung: add DMA support for RX")
> Link: https://lore.kernel.org/r/20261030162334.3000737-1-samarth.colleges@gmail.com
> Assisted-by: LLM
> Signed-off-by: Samarth Narang <samarth.colleges at gmail.com>

That's a real, long standing issue.

Reviewed-by: Marek Szyprowski <m.szyprowski at samsung.com>


> ---
>  drivers/tty/serial/samsung_tty.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 4eeef149b..2f6c69bec 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -553,7 +553,7 @@ static void s3c24xx_serial_stop_rx(struct uart_port *port)
>  		ourport->rx_enabled = 0;
>  	}
>  	if (dma && dma->rx_chan) {
> -		dmaengine_pause(dma->tx_chan);
> +		dmaengine_pause(dma->rx_chan);
>  		dma_status = dmaengine_tx_status(dma->rx_chan,
>  				dma->rx_cookie, &state);
>  		if (dma_status == DMA_IN_PROGRESS ||

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland




More information about the linux-arm-kernel mailing list