From: Judith Mendez <jm@ti.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
Kevin Hilman <khilman@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: <linux-omap@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>,
Judith Mendez <jm@ti.com>, Bin Liu <b-liu@ti.com>
Subject: [PATCH 2/2] serial: 8250: omap: Move pm_runtime_get_sync
Date: Thu, 10 Oct 2024 13:48:02 -0500 [thread overview]
Message-ID: <20241010184802.203441-3-jm@ti.com> (raw)
In-Reply-To: <20241010184802.203441-1-jm@ti.com>
Currently in omap_8250_shutdown, the dma->rx_running
flag is set to zero in omap_8250_rx_dma_flush. Next
pm_runtime_get_sync is called, which is a runtime
resume call stack which can re-set the flag. When the
call omap_8250_shutdown returns, the flag is expected
to be UN-SET, but this is not the case. This is causing
issues the next time UART is re-opened and omap_8250_rx_dma
is called. Fix by moving pm_runtime_get_sync before the
omap_8250_rx_dma_flush.
Fixes: 0e31c8d173ab ("tty: serial: 8250_omap: add custom DMA-RX callback")
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
---
drivers/tty/serial/8250/8250_omap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 88b58f44e4e9..0dd68bdbfbcf 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -776,12 +776,12 @@ static void omap_8250_shutdown(struct uart_port *port)
struct uart_8250_port *up = up_to_u8250p(port);
struct omap8250_priv *priv = port->private_data;
+ pm_runtime_get_sync(port->dev);
+
flush_work(&priv->qos_work);
if (up->dma)
omap_8250_rx_dma_flush(up);
- pm_runtime_get_sync(port->dev);
-
serial_out(up, UART_OMAP_WER, 0);
if (priv->habit & UART_HAS_EFR2)
serial_out(up, UART_OMAP_EFR2, 0x0);
--
2.46.2
next prev parent reply other threads:[~2024-10-10 18:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 18:48 [PATCH 0/2] Misc omap GPIO/UART fixes Judith Mendez
2024-10-10 18:48 ` [PATCH 1/2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez
2024-10-10 18:48 ` Judith Mendez [this message]
2024-10-11 4:46 ` [PATCH 2/2] serial: 8250: omap: Move pm_runtime_get_sync Greg KH
2024-10-11 16:58 ` [PATCH 0/2] Misc omap GPIO/UART fixes Judith Mendez
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=20241010184802.203441-3-jm@ti.com \
--to=jm@ti.com \
--cc=b-liu@ti.com \
--cc=brgl@bgdev.pl \
--cc=grygorii.strashko@ti.com \
--cc=khilman@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ssantosh@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.