aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-05-14 14:28:16 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-09 12:17:32 -0400
commit64578a3de723d502621860f9d4d28f34d001b066 (patch)
tree821e7ad8e8d6c3a0f3224b479ff000e00001a165 /drivers/ata/libata.h
parente5fa24dfdb522b642dbe9b8b1b692f68dce89835 (diff)
libata-acpi: implement _GTM/_STM support
Implement _GTM/_STM support. acpi_gtm is added to ata_port which stores _GTM parameters over suspend/resume cycle. A new hook ata_acpi_on_suspend() is responsible for storing _GTM parameters during suspend. _STM is executed in ata_acpi_on_resume(). With this change, invoking _GTF is safe on IDE hierarchy and acpi_sata check before _GTF is removed. ata_acpi_gtm() and ata_acpi_stm() implementation is taken from Alan Cox's pata_acpi implementation. ata_acpi_gtm() is fixed such that the result parameter is not shifted by sizeof(union acpi_object). Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index bee7cbc4c97c..ba17fc5f2e99 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -99,10 +99,12 @@ extern struct ata_port *ata_port_alloc(struct ata_host *host);
99/* libata-acpi.c */ 99/* libata-acpi.c */
100#ifdef CONFIG_ATA_ACPI 100#ifdef CONFIG_ATA_ACPI
101extern void ata_acpi_associate(struct ata_host *host); 101extern void ata_acpi_associate(struct ata_host *host);
102extern int ata_acpi_on_suspend(struct ata_port *ap);
102extern void ata_acpi_on_resume(struct ata_port *ap); 103extern void ata_acpi_on_resume(struct ata_port *ap);
103extern int ata_acpi_on_devcfg(struct ata_device *adev); 104extern int ata_acpi_on_devcfg(struct ata_device *adev);
104#else 105#else
105static inline void ata_acpi_associate(struct ata_host *host) { } 106static inline void ata_acpi_associate(struct ata_host *host) { }
107static inline int ata_acpi_on_suspend(struct ata_port *ap) { return 0; }
106static inline void ata_acpi_on_resume(struct ata_port *ap) { } 108static inline void ata_acpi_on_resume(struct ata_port *ap) { }
107static inline int ata_acpi_on_devcfg(struct ata_device *adev) { return 0; } 109static inline int ata_acpi_on_devcfg(struct ata_device *adev) { return 0; }
108#endif 110#endif