On Mon, Jan 14, 2008 at 01:40:16PM +1100, [EMAIL PROTECTED] 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 that. 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 - http://www.arm.linux.org.uk/ maintainer of: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/