diff options
author | Shane Huang <shane.huang@amd.com> | 2012-12-17 10:18:59 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2013-01-14 13:29:15 -0500 |
commit | 803739d25c2343da6d2f95eebdcbc08bf67097d4 (patch) | |
tree | 59f3fd6a8285925c79419132b469602f4c36a0bf /include/linux/ata.h | |
parent | 7f9c9f8e24590e7dcd26ca408458c43df5b83e61 (diff) |
[libata] replace sata_settings with devslp_timing
NCQ capability was used to check availability of SATA Settings page
from Identify Device Data Log, which contains DevSlp timing variables.
It does not work on some HDDs and leads to error messages.
IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either
because it is only the sufficient condition of Identify Device data
log, not the necessary condition.
This patch replaced ata_device->sata_settings with ->devslp_timing
to only save DevSlp timing variables(8 bytes), instead of the whole
SATA Settings page(512 bytes).
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Shane Huang <shane.huang@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 408da9502177..8f7a3d68371a 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -297,10 +297,12 @@ enum { | |||
297 | ATA_LOG_SATA_NCQ = 0x10, | 297 | ATA_LOG_SATA_NCQ = 0x10, |
298 | ATA_LOG_SATA_ID_DEV_DATA = 0x30, | 298 | ATA_LOG_SATA_ID_DEV_DATA = 0x30, |
299 | ATA_LOG_SATA_SETTINGS = 0x08, | 299 | ATA_LOG_SATA_SETTINGS = 0x08, |
300 | ATA_LOG_DEVSLP_MDAT = 0x30, | 300 | ATA_LOG_DEVSLP_OFFSET = 0x30, |
301 | ATA_LOG_DEVSLP_SIZE = 0x08, | ||
302 | ATA_LOG_DEVSLP_MDAT = 0x00, | ||
301 | ATA_LOG_DEVSLP_MDAT_MASK = 0x1F, | 303 | ATA_LOG_DEVSLP_MDAT_MASK = 0x1F, |
302 | ATA_LOG_DEVSLP_DETO = 0x31, | 304 | ATA_LOG_DEVSLP_DETO = 0x01, |
303 | ATA_LOG_DEVSLP_VALID = 0x37, | 305 | ATA_LOG_DEVSLP_VALID = 0x07, |
304 | ATA_LOG_DEVSLP_VALID_MASK = 0x80, | 306 | ATA_LOG_DEVSLP_VALID_MASK = 0x80, |
305 | 307 | ||
306 | /* READ/WRITE LONG (obsolete) */ | 308 | /* READ/WRITE LONG (obsolete) */ |