OSDN Git Service

[libata] pm: differentiate system and runtime pm for ata port
authorAaron Lu <aaron.lu@intel.com>
Fri, 25 Jan 2013 06:29:35 +0000 (14:29 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 25 Jan 2013 20:33:33 +0000 (15:33 -0500)
commita7ff60dbe0858496531c75b1544666c099a2b200
tree2bb707b6682c398fbe35db8d3b775272561ddab0
parente175435ed281d06ffd56d4edc8a2dd56f8672f07
[libata] pm: differentiate system and runtime pm for ata port

We need to do different things for system PM and runtime PM, e.g. we do
not need to enable runtime wake for ZPODD when we are doing system
suspend, etc.

Currently, we use PMSG_SUSPEND for both system suspend and runtime
suspend and PMSG_ON for both system resume and runtime resume. Change
this by using PMSG_AUTO_SUSPEND for runtime suspend and PMSG_AUTO_RESUME
for runtime resume. And since PMSG_ON means no transition, it is changed
to PMSG_RESUME for ata port's system resume.

The ata_acpi_set_state is modified accordingly, and the sata case and
pata case is seperated for easy reading.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-acpi.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c