diff options
author | Tejun Heo <htejun@gmail.com> | 2007-12-15 01:05:03 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-17 20:33:14 -0500 |
commit | 398e07826b24cbeb5ff2f0a178367fc9d24cd475 (patch) | |
tree | 78191583f2e1e5bb0aba9fbee8016e72285f4b31 /include | |
parent | c05e6ff035c1b25d17364a685432b33937d3dc23 (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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index ba84d8a37545..cb91280be9bd 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -498,6 +498,7 @@ struct ata_device { | |||
498 | struct scsi_device *sdev; /* attached SCSI device */ | 498 | struct scsi_device *sdev; /* attached SCSI device */ |
499 | #ifdef CONFIG_ATA_ACPI | 499 | #ifdef CONFIG_ATA_ACPI |
500 | acpi_handle acpi_handle; | 500 | acpi_handle acpi_handle; |
501 | union acpi_object *gtf_cache; | ||
501 | #endif | 502 | #endif |
502 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 503 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
503 | u64 n_sectors; /* size of device, if ATA */ | 504 | u64 n_sectors; /* size of device, if ATA */ |