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

David Brownell
2006-07-05T18:40:13Z

On Monday 26 June 2006 11:18 pm, Linus Torvalds wrote:
>
> On Tue, 27 Jun 2006, Adam Belay wrote:
> >
> > Yes, and pci_set_power_state() can require msleep().
>
> Actually, I was looking at that, and it's a problem right now.
>
> For all the silly (and wrong) reasons.

I expect this is what you meant, but one issue I've observed
on at least one platform is that after swsusp resume the preempt
count is goofed ... it's one too big. Which in a recent test, meant
that resume failed because pci_set_power_state() got called in a
context that couldn't msleep(). And in previous tests has led to
similar failures, since resume() calls all expect sleeping is OK
(since that's part of that API contract).

The last time I saw this problem I threw in a hack to drop that
count before starting the device resume calls, but I'm rather
curious why it happens at all. Does this ring bells for anyone?

- Dave