From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Samarth Narang <samarth.colleges@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Peter Griffin <peter.griffin@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] tty: serial: samsung: pause the RX DMA channel in stop_rx
Date: Fri, 6 Nov 2026 11:08:59 +0100 [thread overview]
Message-ID: <f1180687-6e4d-4d76-9a09-bb20d3676099@samsung.com> (raw)
In-Reply-To: <20261031004217.3340610-2-samarth.colleges@gmail.com>
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@gmail.com>
That's a real, long standing issue.
Reviewed-by: Marek Szyprowski <m.szyprowski@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
next prev parent reply other threads:[~2026-11-06 10:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 0:42 [PATCH 0/2] tty: serial: samsung: RX DMA fixes in stop_rx and the RX completion Samarth Narang
2026-10-31 0:42 ` [PATCH 1/2] tty: serial: samsung: pause the RX DMA channel in stop_rx Samarth Narang
2026-11-06 10:08 ` Marek Szyprowski [this message]
2026-10-31 0:42 ` [PATCH 2/2] tty: serial: samsung: do not re-arm RX DMA once RX has been stopped Samarth Narang
2026-11-06 10:35 ` Marek Szyprowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1180687-6e4d-4d76-9a09-bb20d3676099@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=samarth.colleges@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®