mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: dsaxena@plexity.net, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 8250: Don't restore NS16550 mode when console suspend is disabled
Date: Wed, 13 May 2009 16:35:07 +0100	[thread overview]
Message-ID: <20090513163507.556c3832@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.01.0905130755090.3343@localhost.localdomain>

> So we _could_ just save the mode, but that isn't really what this patch is 
> all about. The patch in question is about a total hack to avoid touching a 
> piece of hardware that we simply don't consider normal.

The driver knows and assumes the chip is stuck back into the right
configuration. Things like ttyS0 shared as console and tty won't work
right if we simply pray the configuration comes back sane. It may well do
on OLPC but on a standard generic PC we can't bet on it. If the user has
a high console speed set this patch will do the wrong thing.

No suspend console meaning "I'd like to debug suspend/resume" is only
useful if we actually put the bits back into a sane state coming out of
suspend to ram (and in some cases suspend to disk)

Deepak's original patch from 2008 is actually much better. He puts the
chip back in the right hardware configuration for the speed. He doesn't
randomly regress other platforms and configurations and he does it by
calling the standard methods in the driver to do the job.

http://dev.laptop.org/~dsaxena/patches/console_suspend_old.patch

It also has another advantage - it fixes the behaviour for almost
everything in drivers/serial not just a specific uart. Technically he
should take tty->termios_mutex before state->mutex in that code path as
the upstream code has changed but in every other respect its the proper
solution.

So can we apply Deepak's original correct 2008 patch instead please ?

Alan

  reply	other threads:[~2009-05-13 15:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 21:00 Deepak Saxena
2009-05-12 22:00 ` Linus Torvalds
2009-05-13  0:18   ` Alan Cox
2009-05-13  0:28     ` Deepak Saxena
2009-05-13  8:44       ` Alan Cox
2009-05-13 14:58         ` Linus Torvalds
2009-05-13 15:35           ` Alan Cox [this message]
2009-05-13 18:04             ` Deepak Saxena
2009-05-13 18:46               ` Alan Cox
2009-05-18 18:24                 ` Deepak Saxena
2009-05-18 19:07                   ` Alan Cox
2009-05-13  1:01     ` Joe Perches
2009-05-13  0:34   ` Deepak Saxena
2009-05-12 22:08 ` Michał Mirosław

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=20090513163507.556c3832@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=dsaxena@plexity.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®