lkml.org 
[lkml]   [2008]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won't drain
On Fri, Jan 11, 2008 at 10:17:21AM +0000, Pavel Machek wrote:
> On Tue 2008-01-08 11:57:03, Russell King wrote:
> > + if (!tries)
> > + printk(KERN_ERR "%s%s%s%d: Unable to drain transmitter\n",
> > + port->dev ? port->dev->bus_id : "",
> > + port->dev ? ": " : "",
> > + drv->dev_name, port->line);
> >
> > ops->shutdown(port);
> > }
> >
>
> Is printk() enough for 'we've just lost your data' condition? Maybe we
> should abort suspend if we can't drain fifo?

That would mean that a port set for hardware flow control, with hardware
implemented flow control, has CTS deasserted, you'll never suspend.

If you're suspending because your battery is almost dead what would you
prefer - the system being prevented from suspending and losing complete
power unexpectedly, resulting in complete data loss, or losing the
characters in the serial port and suspending?

Which is the lesser of two evils?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:


\
 
 \ /
  Last update: 2008-01-14 01:33    [W:0.074 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site