All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tony Lindgren <tony@atomide.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-omap@vger.kernel.org, nsekhar@ti.com, nm@ti.com,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH 3/3] serial: 8250: omap: restore registers on shutdown
Date: Thu, 30 Jul 2015 20:51:10 -0400	[thread overview]
Message-ID: <55BAC67E.1010400@hurleysoftware.com> (raw)
In-Reply-To: <87egjp2r4a.fsf@linutronix.de>

Hi John,

On 07/30/2015 06:54 PM, John Ogness wrote:
> 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);
> +		}

I was never really a fan of the deferred set_termios();
I think it's more appropriate to wait for tx dma to
complete in omap_8250_set_termios().

Regards,
Peter Hurley


> +	}
> +
>  	/*
>  	 * Disable break condition and FIFOs
>  	 */
> 

  reply	other threads:[~2015-07-31  0:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 22:54 [PATCH 3/3] serial: 8250: omap: restore registers on shutdown John Ogness
2015-07-30 22:54 ` John Ogness
2015-07-31  0:51 ` Peter Hurley [this message]
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

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=55BAC67E.1010400@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=nsekhar@ti.com \
    --cc=tony@atomide.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 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.