linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] serial: 8250: omap: restore registers on shutdown
@ 2015-07-30 22:54 John Ogness
  2015-07-31  0:51 ` Peter Hurley
  0 siblings, 1 reply; 13+ messages in thread
From: John Ogness @ 2015-07-30 22:54 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Tony Lindgren, Peter Hurley,
	Sebastian Andrzej Siewior, linux-omap, nsekhar

If DMA is active during a shutdown, a delayed restore of the
registers may be pending. The restore must be performed after
the DMA is stopped, otherwise the delayed restore remains
pending and will fire upon the first DMA TX complete of a
totally different serial session.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/tty/serial/8250/8250_omap.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 5b39892..25f6255 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -657,9 +657,15 @@ static void omap_8250_shutdown(struct uart_port *port)
 	up->ier = 0;
 	serial_out(up, UART_IER, 0);
 
-	if (up->dma)
+	if (up->dma) {
 		serial8250_release_dma(up);
 
+		if (priv->delayed_restore) {
+			priv->delayed_restore = 0;
+			omap8250_restore_regs(up);
+		}
+	}
+
 	/*
 	 * Disable break condition and FIFOs
 	 */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-03-02  9:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30 22:54 [PATCH 3/3] serial: 8250: omap: restore registers on shutdown John Ogness
2015-07-31  0:51 ` Peter Hurley
2015-08-03 16:09   ` Sebastian Andrzej Siewior
2015-08-03 16:34     ` Peter Hurley
2015-08-03 16:54       ` Sebastian Andrzej Siewior
2015-08-03 19:32         ` Peter Hurley
2015-08-04 11:58           ` Sebastian Andrzej Siewior
2015-08-06 12:27             ` Peter Hurley
2015-08-06 12:31               ` Sebastian Andrzej Siewior
2015-08-06 13:59                 ` Sebastian Andrzej Siewior
2015-08-06 18:22                   ` Peter Hurley
2015-08-07  0:41                     ` Charles Manning
2016-03-02  9:54     ` John Ogness

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).