diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-18 10:15:09 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-18 10:15:35 +0200 |
commit | 1079cac0f4eb7d968395378b1625979d4c818dd6 (patch) | |
tree | d261058d95d27fe7250511d5fad69db30dc17731 /include/linux/ata.h | |
parent | 5872144f64b34a5942f6b4acedc90b02de72c58b (diff) | |
parent | 1406de8e11eb043681297adf86d6892ff8efc27a (diff) |
Merge commit 'v2.6.30-rc6' into tracing/core
Merge reason: we were on an -rc4 base, sync up to -rc6
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index cb79b7a208e1..915da43edee1 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -730,6 +730,34 @@ static inline int ata_id_has_unload(const u16 *id) return 0; } +static inline int ata_id_form_factor(const u16 *id) +{ + u16 val = id[168]; + + if (ata_id_major_version(id) < 7 || val == 0 || val == 0xffff) + return 0; + + val &= 0xf; + + if (val > 5) + return 0; + + return val; +} + +static inline int ata_id_rotation_rate(const u16 *id) +{ + u16 val = id[217]; + + if (ata_id_major_version(id) < 7 || val == 0 || val == 0xffff) + return 0; + + if (val > 1 && val < 0x401) + return 0; + + return val; +} + static inline int ata_id_has_trim(const u16 *id) { if (ata_id_major_version(id) >= 7 && |