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
On Thu, Oct 10, 2024 at 01:48:02PM -0500, Judith Mendez wrote: > 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 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
© 2016 - 2024 Red Hat, Inc.