aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index be00973d1a8c..d28aad991c75 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -645,7 +645,15 @@ static inline unsigned int ata_id_major_version(const u16 *id)
645 645
646static inline int ata_id_is_sata(const u16 *id) 646static inline int ata_id_is_sata(const u16 *id)
647{ 647{
648 return ata_id_major_version(id) >= 5 && id[ATA_ID_HW_CONFIG] == 0; 648 /*
649 * See if word 93 is 0 AND drive is at least ATA-5 compatible
650 * verifying that word 80 by casting it to a signed type --
651 * this trick allows us to filter out the reserved values of
652 * 0x0000 and 0xffff along with the earlier ATA revisions...
653 */
654 if (id[ATA_ID_HW_CONFIG] == 0 && (short)id[ATA_ID_MAJOR_VER] >= 0x0020)
655 return 1;
656 return 0;
649} 657}
650 658
651static inline int ata_id_has_tpm(const u16 *id) 659static inline int ata_id_has_tpm(const u16 *id)