LKML Archive on
help / color / mirror / Atom feed
From: Russell King <>
Cc: Alan Cox <>, Pavel Machek <>,
	Linux Kernel List <>,
	Andrew Morton <>
Subject: Re: [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won't drain
Date: Mon, 14 Jan 2008 10:04:15 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Jan 14, 2008 at 01:40:16PM +1100, wrote:
> Hi.
> Alan Cox wrote:
> >>> Is printk() enough for 'we've just lost your data' condition? Maybe we
> >>> should abort suspend if we can't drain fifo?
> >> No way. Think about this from a users' perspective. No one wants suspend
> >> to ram or hibernate functionality that works sometimes and not others.
> >> They want it to work reliably so they don't have to worry about their
> >> laptop overheating while they're getting on the bus or airplane.
> >> Aborting isn't an option.
> > 
> > Dumb question on the printk however - what if the port that is sticking
> > is the console - don't we recurse and die ?
> I don't know, but I'd argue that we shouldn't die. Things should be as
> robust as possible.

Of course we should never die.  That's precisely what I'm trying to work
towards here.

Currently without this patch, various platforms I have here do precisely
that - you ask them to suspend and they shut down the majority of devices
and then die.  The recovery is either system reboot or a power cycle -
especially when the port in question is connected to something other than
an external serial port (eg, a serial port for connection to a non-existent
bluetooth module.)

While we're talking about robustness, since the serial wakeup support has
gone in, another couple of issues have appeared:

1. We no longer suspend ports marked as wakeup sources.  That means we
   never place them into a low power state (which might be required by
   hardware) - we need a flag from the driver or something to indicate

2. As a direct consequence, we no longer re-initialise the port at resume
   time, resulting in a completely deconfigured but open port.  Such a
   port may be the system console, which will cause any printks may be
   damned slow and the output will be garbage.

(2) is quite a serious problem for ARM platforms - you lose the console
entirely and you also lose control of the system.  Again, recovery from
such events is by either a power cycle or system reboot.

Russell King
 Linux kernel    2.6 ARM Linux   -
 maintainer of:

  reply	other threads:[~2008-01-14 10:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 11:51 [PATCH: 1/2] [SERIAL] avoid waking up closed serial ports on resume Russell King
2008-01-08 11:57 ` [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won't drain Russell King
2008-01-09  0:06   ` Andrew Morton
2008-01-09  1:29     ` Alan Cox
2008-01-09  8:34     ` Russell King
2008-01-11 10:17   ` Pavel Machek
2008-01-13 22:51     ` nigel
2008-01-14  0:49       ` Alan Cox
2008-01-14  2:40         ` nigel
2008-01-14 10:04           ` Russell King [this message]
2008-01-14  9:46         ` Russell King
2008-01-13 22:56     ` Benjamin Herrenschmidt
2008-01-14  0:29     ` Russell King
2008-01-14  9:04       ` Pavel Machek
2008-01-14  9:35         ` Russell King
2008-01-14 10:21           ` Alan Cox

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won'\''t drain' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).