Re: [PATCH 2/2] Fix console handling during suspend/resume

Linus Torvalds
2006-06-28T00:16:33Z

On Tue, 27 Jun 2006, Alan Stern wrote:
>
> What about other occasions when pci_set_power_state() is called? For
> instance, a selective suspend. Where's the appropriate place to delay in
> that case?
>
> What happens if the system sleep is aborted (some later driver is unable
> to suspend) and everything gets resumed immediately? Where should the 10
> ms delay occur then?

I think the caller should just do it (eg for the suspend path, we could
just say that on failure, before we start waking things up, we mdelay()
for a while).

In practice, I don't think it's an issue. The alternative is to just make
the "msleep()" be an "mdelay()", of course, at which point it's suddenly
irq-safe.

Linus