aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-13 00:13:48 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-13 00:13:48 -0500
commit3875e1945b55f0eb83fe7359614a801eeb716761 (patch)
tree4567aef3fb7d081cb7d7b7c9bcd94e0e44d39557 /include/linux/ata.h
parent587005de144acd3007b8e7f2a2a7c6add157c155 (diff)
parentf1b318793dcd2d9ff6b5ac06e7762098fa079cee (diff)
Merge branch 'upstream'
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 8e88efc565be..469952366ed4 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -270,6 +270,16 @@ struct ata_taskfile {
270 270
271#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) 271#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
272 272
273static inline unsigned int ata_id_major_version(const u16 *id)
274{
275 unsigned int mver;
276
277 for (mver = 14; mver >= 1; mver--)
278 if (id[ATA_ID_MAJOR_VER] & (1 << mver))
279 break;
280 return mver;
281}
282
273static inline int ata_id_current_chs_valid(const u16 *id) 283static inline int ata_id_current_chs_valid(const u16 *id)
274{ 284{
275 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command 285 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command