diff options
| author | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:15:57 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:15:57 -0400 |
| commit | b74b953b998bcc2db91b694446f3a2619ec32de6 (patch) | |
| tree | 6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /include/linux/ata.h | |
| parent | abb438526201c6a79949ad45375c051b6681c253 (diff) | |
| parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) | |
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c
(commit eda603f).
Diffstat (limited to 'include/linux/ata.h')
| -rw-r--r-- | include/linux/ata.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 38a6948ce0c2..fe6e681a9d74 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
| @@ -467,7 +467,7 @@ enum ata_ioctls { | |||
| 467 | 467 | ||
| 468 | /* core structures */ | 468 | /* core structures */ |
| 469 | 469 | ||
| 470 | struct ata_prd { | 470 | struct ata_bmdma_prd { |
| 471 | __le32 addr; | 471 | __le32 addr; |
| 472 | __le32 flags_len; | 472 | __le32 flags_len; |
| 473 | }; | 473 | }; |
| @@ -647,9 +647,9 @@ static inline int ata_id_has_large_logical_sectors(const u16 *id) | |||
| 647 | return id[ATA_ID_SECTOR_SIZE] & (1 << 13); | 647 | return id[ATA_ID_SECTOR_SIZE] & (1 << 13); |
| 648 | } | 648 | } |
| 649 | 649 | ||
| 650 | static inline u8 ata_id_logical_per_physical_sectors(const u16 *id) | 650 | static inline u16 ata_id_logical_per_physical_sectors(const u16 *id) |
| 651 | { | 651 | { |
| 652 | return id[ATA_ID_SECTOR_SIZE] & 0xf; | 652 | return 1 << (id[ATA_ID_SECTOR_SIZE] & 0xf); |
| 653 | } | 653 | } |
| 654 | 654 | ||
| 655 | static inline int ata_id_has_lba48(const u16 *id) | 655 | static inline int ata_id_has_lba48(const u16 *id) |
| @@ -841,7 +841,8 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
| 841 | 841 | ||
| 842 | static inline int ata_id_is_cfa(const u16 *id) | 842 | static inline int ata_id_is_cfa(const u16 *id) |
| 843 | { | 843 | { |
| 844 | if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ | 844 | if ((id[ATA_ID_CONFIG] == 0x848A) || /* Traditional CF */ |
| 845 | (id[ATA_ID_CONFIG] == 0x844A)) /* Delkin Devices CF */ | ||
| 845 | return 1; | 846 | return 1; |
| 846 | /* | 847 | /* |
| 847 | * CF specs don't require specific value in the word 0 anymore and yet | 848 | * CF specs don't require specific value in the word 0 anymore and yet |
| @@ -1024,8 +1025,8 @@ static inline int ata_ok(u8 status) | |||
| 1024 | 1025 | ||
| 1025 | static inline int lba_28_ok(u64 block, u32 n_block) | 1026 | static inline int lba_28_ok(u64 block, u32 n_block) |
| 1026 | { | 1027 | { |
| 1027 | /* check the ending block number */ | 1028 | /* check the ending block number: must be LESS THAN 0x0fffffff */ |
| 1028 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); | 1029 | return ((block + n_block) < ((1 << 28) - 1)) && (n_block <= 256); |
| 1029 | } | 1030 | } |
| 1030 | 1031 | ||
| 1031 | static inline int lba_48_ok(u64 block, u32 n_block) | 1032 | static inline int lba_48_ok(u64 block, u32 n_block) |
