diff options
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index a53318b8cbd0..9a061accd8b8 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -89,6 +89,8 @@ enum { | |||
89 | ATA_ID_DLF = 128, | 89 | ATA_ID_DLF = 128, |
90 | ATA_ID_CSFO = 129, | 90 | ATA_ID_CSFO = 129, |
91 | ATA_ID_CFA_POWER = 160, | 91 | ATA_ID_CFA_POWER = 160, |
92 | ATA_ID_CFA_KEY_MGMT = 162, | ||
93 | ATA_ID_CFA_MODES = 163, | ||
92 | ATA_ID_ROT_SPEED = 217, | 94 | ATA_ID_ROT_SPEED = 217, |
93 | ATA_ID_PIO4 = (1 << 1), | 95 | ATA_ID_PIO4 = (1 << 1), |
94 | 96 | ||
@@ -731,12 +733,17 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
731 | 733 | ||
732 | static inline int ata_id_is_cfa(const u16 *id) | 734 | static inline int ata_id_is_cfa(const u16 *id) |
733 | { | 735 | { |
734 | if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */ | 736 | if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ |
735 | return 1; | 737 | return 1; |
736 | /* Could be CF hiding as standard ATA */ | 738 | /* |
737 | if (ata_id_major_version(id) >= 3 && | 739 | * CF specs don't require specific value in the word 0 anymore and yet |
738 | id[ATA_ID_COMMAND_SET_1] != 0xFFFF && | 740 | * they forbid to report the ATA version in the word 80 and require the |
739 | (id[ATA_ID_COMMAND_SET_1] & (1 << 2))) | 741 | * CFA feature set support to be indicated in the word 83 in this case. |
742 | * Unfortunately, some cards only follow either of this requirements, | ||
743 | * and while those that don't indicate CFA feature support need some | ||
744 | * sort of quirk list, it seems impractical for the ones that do... | ||
745 | */ | ||
746 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004) | ||
740 | return 1; | 747 | return 1; |
741 | return 0; | 748 | return 0; |
742 | } | 749 | } |