public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, Deepak Saxena <dsaxena@laptop.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: console resume broken since ba15ab0e8de0d4439a91342ad52d55ca9e313f3d
Date: Sun, 4 Oct 2009 21:01:25 +0200	[thread overview]
Message-ID: <20091004190125.GF1378@ucw.cz> (raw)
In-Reply-To: <20090930151103.GU27039@pengutronix.de>

On Wed 2009-09-30 17:11:03, Sascha Hauer wrote:
> 
> This patch fixes setting the console speed if console suspend is disabled
> by breaking it if it is enabled, see below:
> 
> > commit ba15ab0e8de0d4439a91342ad52d55ca9e313f3d
> > Author: Deepak Saxena <dsaxena@laptop.org>
> > Date:   Sat Sep 19 13:13:33 2009 -0700
...
> > 
> >     Set proper console speed on resume if console suspend is disabled
> >     
> >     Commit b5b82df6, from May 2007, breaks no_console_suspend on the OLPC
> >     XO laptop. Basically what happens is that upon returning from resume,
> >     serial8250_resume_port() will reconfigure the port for high speed
> >     mode and all console output will be garbled, making debug of the
> >     resume path painful. This patch modifies uart_resume_port() to
> >     reset the port to the state it was in before we suspended.
> >     
> >     Original patch by Marcelo Tosatti
> > -		struct ktermios termios;
> > -
> > -		/*
> > -		 * First try to use the console cflag setting.
> > -		 */
> > -		memset(&termios, 0, sizeof(struct ktermios));
> > -		termios.c_cflag = uport->cons->cflag;
> > -
> > -		/*
> > -		 * If that's unset, use the tty termios setting.
> > -		 */
> > -		if (port->tty && termios.c_cflag == 0)
> > -			termios = *port->tty->termios;
> > -
> >  		uart_change_pm(state, 0);
> >  		uport->ops->set_termios(uport, &termios, NULL);
> 
> 
> We call ->set_termios with an unitialized struct ktermios here.
> 
> Any ideas what to do?

Revert the patch for now and make Deepak fix it properly?

Or maybe it is enough to just 'do nothing' in the 'if that's unset'
branch?


								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2009-10-04 19:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 15:11 console resume broken since ba15ab0e8de0d4439a91342ad52d55ca9e313f3d Sascha Hauer
2009-10-04 19:01 ` Pavel Machek [this message]

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=20091004190125.GF1378@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=dsaxena@laptop.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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