aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/libata.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 0c4f63b55ec6..8d3e391ab8d3 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -198,6 +198,7 @@ enum {
198 ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */ 198 ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */
199 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ 199 ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */
200 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ 200 ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
201 ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */
201 202
202 /* struct ata_queued_cmd flags */ 203 /* struct ata_queued_cmd flags */
203 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ 204 ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
@@ -493,6 +494,17 @@ struct ata_eh_context {
493 unsigned int did_probe_mask; 494 unsigned int did_probe_mask;
494}; 495};
495 496
497struct ata_acpi_drive
498{
499 u32 pio;
500 u32 dma;
501} __packed;
502
503struct ata_acpi_gtm {
504 struct ata_acpi_drive drive[2];
505 u32 flags;
506} __packed;
507
496struct ata_port { 508struct ata_port {
497 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */ 509 struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
498 const struct ata_port_operations *ops; 510 const struct ata_port_operations *ops;
@@ -555,6 +567,7 @@ struct ata_port {
555 567
556#ifdef CONFIG_ATA_ACPI 568#ifdef CONFIG_ATA_ACPI
557 acpi_handle acpi_handle; 569 acpi_handle acpi_handle;
570 struct ata_acpi_gtm acpi_gtm;
558#endif 571#endif
559 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ 572 u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */
560}; 573};