• Home
  • Raw
  • Download

Lines Matching refs:id

425 #define ata_id_is_ata(id)		(((id)[0] & (1 << 15)) == 0)  argument
426 #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) argument
427 #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) argument
428 #define ata_id_has_ncq(id) ((id)[76] & (1 << 8)) argument
429 #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) argument
430 #define ata_id_removeable(id) ((id)[0] & (1 << 7)) argument
431 #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) argument
432 #define ata_id_has_iordy(id) ((id)[49] & (1 << 11)) argument
434 #define ata_id_u32(id,n) \ argument
435 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
436 #define ata_id_u64(id,n) \ argument
437 ( ((u64) (id)[(n) + 3] << 48) | \
438 ((u64) (id)[(n) + 2] << 32) | \
439 ((u64) (id)[(n) + 1] << 16) | \
440 ((u64) (id)[(n) + 0]) )
442 #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) argument
444 static inline int ata_id_has_fua(const u16 *id) in ata_id_has_fua() argument
446 if ((id[84] & 0xC000) != 0x4000) in ata_id_has_fua()
448 return id[84] & (1 << 6); in ata_id_has_fua()
451 static inline int ata_id_has_flush(const u16 *id) in ata_id_has_flush() argument
453 if ((id[83] & 0xC000) != 0x4000) in ata_id_has_flush()
455 return id[83] & (1 << 12); in ata_id_has_flush()
458 static inline int ata_id_has_flush_ext(const u16 *id) in ata_id_has_flush_ext() argument
460 if ((id[83] & 0xC000) != 0x4000) in ata_id_has_flush_ext()
462 return id[83] & (1 << 13); in ata_id_has_flush_ext()
465 static inline int ata_id_has_lba48(const u16 *id) in ata_id_has_lba48() argument
467 if ((id[83] & 0xC000) != 0x4000) in ata_id_has_lba48()
469 if (!ata_id_u64(id, 100)) in ata_id_has_lba48()
471 return id[83] & (1 << 10); in ata_id_has_lba48()
474 static inline int ata_id_hpa_enabled(const u16 *id) in ata_id_hpa_enabled() argument
477 if ((id[83] & 0xC000) != 0x4000) in ata_id_hpa_enabled()
480 if ((id[87] & 0xC000) != 0x4000) in ata_id_hpa_enabled()
483 if ((id[85] & ( 1 << 10)) == 0) in ata_id_hpa_enabled()
485 return id[82] & (1 << 10); in ata_id_hpa_enabled()
488 static inline int ata_id_has_wcache(const u16 *id) in ata_id_has_wcache() argument
491 if ((id[83] & 0xC000) != 0x4000) in ata_id_has_wcache()
493 return id[82] & (1 << 5); in ata_id_has_wcache()
496 static inline int ata_id_has_pm(const u16 *id) in ata_id_has_pm() argument
498 if ((id[83] & 0xC000) != 0x4000) in ata_id_has_pm()
500 return id[82] & (1 << 3); in ata_id_has_pm()
503 static inline int ata_id_rahead_enabled(const u16 *id) in ata_id_rahead_enabled() argument
505 if ((id[87] & 0xC000) != 0x4000) in ata_id_rahead_enabled()
507 return id[85] & (1 << 6); in ata_id_rahead_enabled()
510 static inline int ata_id_wcache_enabled(const u16 *id) in ata_id_wcache_enabled() argument
512 if ((id[87] & 0xC000) != 0x4000) in ata_id_wcache_enabled()
514 return id[85] & (1 << 5); in ata_id_wcache_enabled()
517 static inline unsigned int ata_id_major_version(const u16 *id) in ata_id_major_version() argument
521 if (id[ATA_ID_MAJOR_VER] == 0xFFFF) in ata_id_major_version()
525 if (id[ATA_ID_MAJOR_VER] & (1 << mver)) in ata_id_major_version()
530 static inline int ata_id_is_sata(const u16 *id) in ata_id_is_sata() argument
532 return ata_id_major_version(id) >= 5 && id[93] == 0; in ata_id_is_sata()
535 static inline int ata_id_has_tpm(const u16 *id) in ata_id_has_tpm() argument
538 if (ata_id_major_version(id) < 8) in ata_id_has_tpm()
540 if ((id[48] & 0xC000) != 0x4000) in ata_id_has_tpm()
542 return id[48] & (1 << 0); in ata_id_has_tpm()
545 static inline int ata_id_has_dword_io(const u16 *id) in ata_id_has_dword_io() argument
548 if (ata_id_major_version(id) > 7) in ata_id_has_dword_io()
550 if (id[48] & (1 << 0)) in ata_id_has_dword_io()
555 static inline int ata_id_current_chs_valid(const u16 *id) in ata_id_current_chs_valid() argument
560 return (id[53] & 0x01) && /* Current translation valid */ in ata_id_current_chs_valid()
561 id[54] && /* cylinders in current translation */ in ata_id_current_chs_valid()
562 id[55] && /* heads in current translation */ in ata_id_current_chs_valid()
563 id[55] <= 16 && in ata_id_current_chs_valid()
564 id[56]; /* sectors in current translation */ in ata_id_current_chs_valid()
567 static inline int ata_id_is_cfa(const u16 *id) in ata_id_is_cfa() argument
569 u16 v = id[0]; in ata_id_is_cfa()
573 if (ata_id_major_version(id) >= 3 && id[82] != 0xFFFF && in ata_id_is_cfa()
574 (id[82] & ( 1 << 2))) in ata_id_is_cfa()
647 u64 ata_id_n_sectors(u16 *id);
649 void ata_id_c_string(const u16 *id, unsigned char *s,
651 void ata_dump_id(u16 *id);