summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-12-15 15:05:03 +0900
committerJeff Garzik <jeff@garzik.org>2007-12-17 20:33:14 -0500
commit398e07826b24cbeb5ff2f0a178367fc9d24cd475 (patch)
tree78191583f2e1e5bb0aba9fbee8016e72285f4b31 /include
parentc05e6ff035c1b25d17364a685432b33937d3dc23 (diff)
libata-acpi: implement dev->gtf_cache and evaluate _GTF right after _STM during resume
On certain implementations, _GTF evaluation depends on preceding _STM and both can be pretty picky about the configuration. Using _GTM result cached during controller initialization satisfies the most neurotic _STM implementation. However, libata evaluates _GTF after reset during device configuration and the hardware state can be different from what _GTF expects and can cause evaluation failure. This patch adds dev->gtf_cache and updates ata_dev_get_GTF() such that it uses the cached value if available. Cache is cleared with a call to ata_acpi_clear_gtf(). Because for SATA ACPI nodes _GTF must be evaluated after _SDD which can't be done till IDENTIFY is complete, _GTF caching from ata_acpi_on_resume() is used only for IDE ACPI nodes. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index ba84d8a3754..cb91280be9b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -498,6 +498,7 @@ struct ata_device {
struct scsi_device *sdev; /* attached SCSI device */
#ifdef CONFIG_ATA_ACPI
acpi_handle acpi_handle;
+ union acpi_object *gtf_cache;
#endif
/* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
u64 n_sectors; /* size of device, if ATA */