Re: device_suspend() levels [was Re: [patch] ACPI work on aic7xxx]

Benjamin Herrenschmidt
2004-07-20T20:43:29Z

On Tue, 2004-07-20 at 16:38, Nathan Bryant wrote:
> Benjamin Herrenschmidt wrote:
> > NO ! The exact opposite in fact. I'll work on cleaning that up and
> > write some doco this week with Pavel.
>
> Did more code reading. I assume the value passed to pci_dev->suspend is
> going to be one of:
>
> enum {
> PM_SUSPEND_ON,
> PM_SUSPEND_STANDBY,
> PM_SUSPEND_MEM,
> PM_SUSPEND_DISK,
> PM_SUSPEND_MAX,
> };

Yes something around those lines

> And the value passed to pci_set_power_state will continue to be 0..3
> (except enumerated)?

We could keep those unenumerated, which power state is to be used by the
device is under driver control, most of the time, they'll do D3 though,
for suspend-to-RAM, and they can probably just not do anything special
for suspend-to-disk (except shutting down the driver itself of course)

Note regarding aix7xxx, we also need proper hooks in the SCSI stack to
block the queue correctly etc... in the same way we do on IDE. I didn't
have time to look into this yet.

Ben.