summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2007-11-02 09:32:38 +0800
committerJeff Garzik <jeff@garzik.org>2008-01-23 05:24:09 -0500
commitbd3adca52bc43b72c75db3e4c7809d47923b154c (patch)
treeec42456926e50a4b0adf916ac1c5f39f76e057f8 /drivers/ata/libata-eh.c
parentae8d4ee7ff429136c8b482c3b38ed994c021d3fc (diff)
downloadlinux-bd3adca52bc43b72c75db3e4c7809d47923b154c.tar.gz
linux-bd3adca52bc43b72c75db3e4c7809d47923b154c.tar.bz2
linux-bd3adca52bc43b72c75db3e4c7809d47923b154c.zip
libata-acpi: add ACPI _PSx method
ACPI spec (ver 3.0a, p289) requires IDE power on/off executes ACPI _PSx methods. As recently most PATA drivers use libata, this patch adds _PSx method support in libata. ACPI spec doesn't mention if SATA requires the same _PSx method. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 21a81cd148e4..1d7faab64810 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2747,6 +2747,7 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)
if (ap->ops->port_suspend)
rc = ap->ops->port_suspend(ap, ap->pm_mesg);
+ ata_acpi_set_state(ap, PMSG_SUSPEND);
out:
/* report result */
spin_lock_irqsave(ap->lock, flags);
@@ -2792,6 +2793,8 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
WARN_ON(!(ap->pflags & ATA_PFLAG_SUSPENDED));
+ ata_acpi_set_state(ap, PMSG_ON);
+
if (ap->ops->port_resume)
rc = ap->ops->port_resume(ap);