diff options
author | Tejun Heo <htejun@gmail.com> | 2006-03-05 14:31:56 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-11 19:03:38 -0500 |
commit | 1da7b0d01b20bf21f3263d8d2f17fa49a214d773 (patch) | |
tree | ed68984a55447d5620adbe885d9479bf96213bd6 /include/linux/libata.h | |
parent | 2e755f68ee23b03484fde18d978f910cc5479cb8 (diff) |
[PATCH] libata: improve xfer mask constants and update ata_mode_string()
Add ATA_BITS_*, ATA_MASK_* macros and reorder xfer_mask fields such
that higher transfer mode is placed at higher order bit. As thie
reordering breaks ata_mode_string(), this patch also rewrites
ata_mode_string().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 15674923cc84..239408ecfddf 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -188,11 +188,19 @@ enum { | |||
188 | PORT_DISABLED = 2, | 188 | PORT_DISABLED = 2, |
189 | 189 | ||
190 | /* encoding various smaller bitmaps into a single | 190 | /* encoding various smaller bitmaps into a single |
191 | * unsigned long bitmap | 191 | * unsigned int bitmap |
192 | */ | 192 | */ |
193 | ATA_SHIFT_UDMA = 0, | 193 | ATA_BITS_PIO = 5, |
194 | ATA_SHIFT_MWDMA = 8, | 194 | ATA_BITS_MWDMA = 3, |
195 | ATA_SHIFT_PIO = 11, | 195 | ATA_BITS_UDMA = 8, |
196 | |||
197 | ATA_SHIFT_PIO = 0, | ||
198 | ATA_SHIFT_MWDMA = ATA_SHIFT_PIO + ATA_BITS_PIO, | ||
199 | ATA_SHIFT_UDMA = ATA_SHIFT_MWDMA + ATA_BITS_MWDMA, | ||
200 | |||
201 | ATA_MASK_PIO = ((1 << ATA_BITS_PIO) - 1) << ATA_SHIFT_PIO, | ||
202 | ATA_MASK_MWDMA = ((1 << ATA_BITS_MWDMA) - 1) << ATA_SHIFT_MWDMA, | ||
203 | ATA_MASK_UDMA = ((1 << ATA_BITS_UDMA) - 1) << ATA_SHIFT_UDMA, | ||
196 | 204 | ||
197 | /* size of buffer to pad xfers ending on unaligned boundaries */ | 205 | /* size of buffer to pad xfers ending on unaligned boundaries */ |
198 | ATA_DMA_PAD_SZ = 4, | 206 | ATA_DMA_PAD_SZ = 4, |