Re: Nested suspends; messages vs. states

Pavel Machek
2005-03-21T22:26:09Z

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

On Po 21-03-05 16:14:09, Alan Stern wrote:
> On Mon, 21 Mar 2005, Pavel Machek wrote:
>
> > Hi!
> >
> > > Messages vs. states: At the moment the PM core seems to be pretty
> > > confused over this distinction. Right in the definition of struct
> > > dev_pm_info we have:
> > >
> > > pm_message_t power_state;
> > >
> > > Obviously a message isn't the same thing as a state. This looks like
> > > something that will need to be changed in a lot of drivers when we
> > > introduce the new notion of a power state.
> >
> > This is not so obvious to me. Message seems to represent the state
> > driver is in quite well... Plus we need PMSG_ON for state the device
> > gets after resume, but that's quite easy...
>
> So what value for power_state do you use to tell apart PCI D1 from D2?

You just ask via pci_choose_state(), and it tells
you... pci_choose_state() should be deterministic.
Pavel

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!