diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2008-09-24 07:05:10 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:19 -0400 |
commit | 8bff7c6b0f63c7ee9c5e3a076338d74125b8debb (patch) | |
tree | 0863c7e0d09592ee9f4d568625348ef12e4a30df /include | |
parent | a68bbddba486020c9c74825ce90c4c1ec463e0e8 (diff) |
libata: set queue SSD flag for SSD devices
SSD devices should give an RPM setting of 1 in word 217 of the ID
page. If we see such a device, tell the block layer about it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ata.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 8a12d718c169..c1c8b4a4ba26 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -88,6 +88,7 @@ enum { | |||
88 | ATA_ID_DLF = 128, | 88 | ATA_ID_DLF = 128, |
89 | ATA_ID_CSFO = 129, | 89 | ATA_ID_CSFO = 129, |
90 | ATA_ID_CFA_POWER = 160, | 90 | ATA_ID_CFA_POWER = 160, |
91 | ATA_ID_ROT_SPEED = 217, | ||
91 | ATA_ID_PIO4 = (1 << 1), | 92 | ATA_ID_PIO4 = (1 << 1), |
92 | 93 | ||
93 | ATA_ID_SERNO_LEN = 20, | 94 | ATA_ID_SERNO_LEN = 20, |
@@ -691,6 +692,11 @@ static inline int ata_id_is_cfa(const u16 *id) | |||
691 | return 0; | 692 | return 0; |
692 | } | 693 | } |
693 | 694 | ||
695 | static inline int ata_id_is_ssd(const u16 *id) | ||
696 | { | ||
697 | return id[ATA_ID_ROT_SPEED] == 0x01; | ||
698 | } | ||
699 | |||
694 | static inline int ata_drive_40wire(const u16 *dev_id) | 700 | static inline int ata_drive_40wire(const u16 *dev_id) |
695 | { | 701 | { |
696 | if (ata_id_is_sata(dev_id)) | 702 | if (ata_id_is_sata(dev_id)) |