aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorShane Huang <shane.huang@amd.com>2012-11-17 15:44:41 -0500
committerJeff Garzik <jgarzik@redhat.com>2012-12-03 04:57:37 -0500
commitde90cd71f68e947d3bd6c3f2ef5731ead010a768 (patch)
tree0a5f7196d4026847fcfa26ecb04389975e8abe9e /include
parent0d0cdb028f9d9771e2b346038707734121f906e3 (diff)
libata: check SATA_SETTINGS log with HW Feature Ctrl
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) should be used. Quoting SATA spec 3.1: If Hardware Feature Control is supported, then: a) IDENTIFY DEVICE data word 78 bit 5 (see 13.2.1.18) shall be set to one; b) the SET FEATURES Select Hardware Feature Control subcommand shall be supported (see 13.3.8); c) page 08h of the Identify Device Data log (see 13.7.7) shall be supported; This patch is not tested on SATA HDD with DevSlp supported. Reported-by: Borislav Petkov <bp@amd64.org> Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 408da950217..18cbb93fdbc 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -593,6 +593,7 @@ static inline int ata_is_data(u8 prot)
593#define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20) 593#define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20)
594#define ata_id_has_da(id) ((id)[ATA_ID_SATA_CAPABILITY_2] & (1 << 4)) 594#define ata_id_has_da(id) ((id)[ATA_ID_SATA_CAPABILITY_2] & (1 << 4))
595#define ata_id_has_devslp(id) ((id)[ATA_ID_FEATURE_SUPP] & (1 << 8)) 595#define ata_id_has_devslp(id) ((id)[ATA_ID_FEATURE_SUPP] & (1 << 8))
596#define ata_id_has_hw_feature_ctrl(id) ((id)[ATA_ID_FEATURE_SUPP] & (1 << 5))
596 597
597static inline bool ata_id_has_hipm(const u16 *id) 598static inline bool ata_id_has_hipm(const u16 *id)
598{ 599{