public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Moteen Shah <m-shah@ti.com>
To: <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>,
	<vigneshr@ti.com>, <u-kumar1@ti.com>, <gehariprasath@ti.com>,
	<g-praveen@ti.com>, <j-keerthy@ti.com>, <m-shah@ti.com>
Subject: [PATCH 2/2] serial: 8250: 8250_omap.c: Clear DMA RX running status only after DMA termination is done
Date: Mon, 12 Jan 2026 13:48:29 +0530	[thread overview]
Message-ID: <20260112081829.63049-3-m-shah@ti.com> (raw)
In-Reply-To: <20260112081829.63049-1-m-shah@ti.com>

Clear rx_running flag only after DMA teardown polling completes. In the
previous implementation the flag was being cleared while hardware teardown
was still in progress, creating a mismatch between software state
(flag = 0, "ready") and hardware state (still terminating).

Signed-off-by: Moteen Shah <m-shah@ti.com>
---
 drivers/tty/serial/8250/8250_omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index e26bae0a6488..272bc07c9a6b 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -931,7 +931,6 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
 		goto out;
 
 	cookie = dma->rx_cookie;
-	dma->rx_running = 0;
 
 	/* Re-enable RX FIFO interrupt now that transfer is complete */
 	if (priv->habit & UART_HAS_RHR_IT_DIS) {
@@ -965,6 +964,7 @@ static void __dma_rx_do_complete(struct uart_8250_port *p)
 		goto out;
 	ret = tty_insert_flip_string(tty_port, dma->rx_buf, count);
 
+	dma->rx_running = 0;
 	p->port.icount.rx += ret;
 	p->port.icount.buf_overrun += count - ret;
 out:
-- 
2.34.1


  parent reply	other threads:[~2026-01-12  8:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12  8:18 [PATCH 0/2] Enhancements to UART driver for error handling and DMA RX status Moteen Shah
2026-01-12  8:18 ` [PATCH 1/2] serial: 8250: 8250_omap.c: Add support for handling UART error conditions Moteen Shah
2026-01-20  5:28   ` Kumar, Udit
2026-01-12  8:18 ` Moteen Shah [this message]
2026-01-20  5:18   ` [PATCH 2/2] serial: 8250: 8250_omap.c: Clear DMA RX running status only after DMA termination is done Kumar, Udit

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=20260112081829.63049-3-m-shah@ti.com \
    --to=m-shah@ti.com \
    --cc=g-praveen@ti.com \
    --cc=gehariprasath@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=j-keerthy@ti.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.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