Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328641
b: refs/heads/master
c: 583661a
h: refs/heads/master
i:
  328639: 9c0cee6
v: v3
  • Loading branch information
Shane Huang authored and Jeff Garzik committed Sep 13, 2012
1 parent f271646 commit bbfa795
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9973a1c306a01804c41ab34166f1320c9f209038
refs/heads/master: 583661a89ed2e484bd295e7b4606099340478c38
21 changes: 13 additions & 8 deletions trunk/include/linux/ata.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ enum {
ATA_ID_EIDE_PIO_IORDY = 68,
ATA_ID_ADDITIONAL_SUPP = 69,
ATA_ID_QUEUE_DEPTH = 75,
ATA_ID_SATA_CAPABILITY = 76,
ATA_ID_SATA_CAPABILITY_2 = 77,
ATA_ID_FEATURE_SUPP = 78,
ATA_ID_MAJOR_VER = 80,
ATA_ID_COMMAND_SET_1 = 82,
ATA_ID_COMMAND_SET_2 = 83,
Expand Down Expand Up @@ -558,15 +561,17 @@ static inline int ata_is_data(u8 prot)
#define ata_id_is_ata(id) (((id)[ATA_ID_CONFIG] & (1 << 15)) == 0)
#define ata_id_has_lba(id) ((id)[ATA_ID_CAPABILITY] & (1 << 9))
#define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8))
#define ata_id_has_ncq(id) ((id)[76] & (1 << 8))
#define ata_id_has_ncq(id) ((id)[ATA_ID_SATA_CAPABILITY] & (1 << 8))
#define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1)
#define ata_id_removeable(id) ((id)[ATA_ID_CONFIG] & (1 << 7))
#define ata_id_has_atapi_AN(id) \
( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \
((id)[78] & (1 << 5)) )
((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
((id)[ATA_ID_FEATURE_SUPP] & (1 << 5)))
#define ata_id_has_fpdma_aa(id) \
( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \
((id)[78] & (1 << 2)) )
((((id)[ATA_ID_SATA_CAPABILITY] != 0x0000) && \
((id)[ATA_ID_SATA_CAPABILITY] != 0xffff)) && \
((id)[ATA_ID_FEATURE_SUPP] & (1 << 2)))
#define ata_id_iordy_disable(id) ((id)[ATA_ID_CAPABILITY] & (1 << 10))
#define ata_id_has_iordy(id) ((id)[ATA_ID_CAPABILITY] & (1 << 11))
#define ata_id_u32(id,n) \
Expand All @@ -578,11 +583,11 @@ static inline int ata_is_data(u8 prot)
((u64) (id)[(n) + 0]) )

#define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20)
#define ata_id_has_da(id) ((id)[77] & (1 << 4))
#define ata_id_has_da(id) ((id)[ATA_ID_SATA_CAPABILITY_2] & (1 << 4))

static inline bool ata_id_has_hipm(const u16 *id)
{
u16 val = id[76];
u16 val = id[ATA_ID_SATA_CAPABILITY];

if (val == 0 || val == 0xffff)
return false;
Expand All @@ -592,7 +597,7 @@ static inline bool ata_id_has_hipm(const u16 *id)

static inline bool ata_id_has_dipm(const u16 *id)
{
u16 val = id[78];
u16 val = id[ATA_ID_FEATURE_SUPP];

if (val == 0 || val == 0xffff)
return false;
Expand Down

0 comments on commit bbfa795

Please sign in to comment.