aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:07 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:07 -0500
commit74095a91ed02f6727b62d4416be00a041f2d7436 (patch)
tree033cc52877103739c5b55a2cfdd3bfaf6996d5d3 /include/linux/ide.h
parent9a3c49be5c5f7388eefb712be9a383904140532e (diff)
ide: use do_rw_taskfile() in flagged_taskfile()
Based on the earlier work by Tejun Heo. * Move setting IDE_TFLAG_LBA48 taskfile flag from do_rw_taskfile() function to the callers. * Add IDE_TFLAG_FLAGGED taskfile flag for flagged taskfiles coming from ide_taskfile_ioctl(). Check it instead of ->tf_out_flags.all. * Add IDE_TFLAG_OUT_DATA taskfile flag to indicate the need to load IDE data register in ide_tf_load(). * Add IDE_TFLAG_OUT_* taskfile flags to indicate the need to load particular IDE taskfile registers in ide_tf_load(). * Update do_rw_taskfile() and ide_tf_load() users to set respective IDE_TFLAG_OUT_* taksfile flags. * Add task_dma_ok() helper. * Use IDE_TFLAG_FLAGGED taskfile flag to select HIHI mask in ide_tf_load(). * Use do_rw_taskfile() in flagged_taskfile(). * Remove no longer needed 'tf_out_flags' field from ide_task_t. There should be no functionality changes caused by this patch. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 11bfbc40c50a..6dfee2a46f1b 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1063,6 +1063,28 @@ extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *);
1063enum { 1063enum {
1064 IDE_TFLAG_LBA48 = (1 << 0), 1064 IDE_TFLAG_LBA48 = (1 << 0),
1065 IDE_TFLAG_NO_SELECT_MASK = (1 << 1), 1065 IDE_TFLAG_NO_SELECT_MASK = (1 << 1),
1066 IDE_TFLAG_FLAGGED = (1 << 2),
1067 IDE_TFLAG_OUT_DATA = (1 << 3),
1068 IDE_TFLAG_OUT_HOB_FEATURE = (1 << 4),
1069 IDE_TFLAG_OUT_HOB_NSECT = (1 << 5),
1070 IDE_TFLAG_OUT_HOB_LBAL = (1 << 6),
1071 IDE_TFLAG_OUT_HOB_LBAM = (1 << 7),
1072 IDE_TFLAG_OUT_HOB_LBAH = (1 << 8),
1073 IDE_TFLAG_OUT_HOB = IDE_TFLAG_OUT_HOB_FEATURE |
1074 IDE_TFLAG_OUT_HOB_NSECT |
1075 IDE_TFLAG_OUT_HOB_LBAL |
1076 IDE_TFLAG_OUT_HOB_LBAM |
1077 IDE_TFLAG_OUT_HOB_LBAH,
1078 IDE_TFLAG_OUT_FEATURE = (1 << 9),
1079 IDE_TFLAG_OUT_NSECT = (1 << 10),
1080 IDE_TFLAG_OUT_LBAL = (1 << 11),
1081 IDE_TFLAG_OUT_LBAM = (1 << 12),
1082 IDE_TFLAG_OUT_LBAH = (1 << 13),
1083 IDE_TFLAG_OUT_TF = IDE_TFLAG_OUT_FEATURE |
1084 IDE_TFLAG_OUT_NSECT |
1085 IDE_TFLAG_OUT_LBAL |
1086 IDE_TFLAG_OUT_LBAM |
1087 IDE_TFLAG_OUT_LBAH,
1066}; 1088};
1067 1089
1068struct ide_taskfile { 1090struct ide_taskfile {
@@ -1099,8 +1121,7 @@ typedef struct ide_task_s {
1099 struct ide_taskfile tf; 1121 struct ide_taskfile tf;
1100 u8 tf_array[14]; 1122 u8 tf_array[14];
1101 }; 1123 };
1102 u8 tf_flags; 1124 u16 tf_flags;
1103 ide_reg_valid_t tf_out_flags;
1104 ide_reg_valid_t tf_in_flags; 1125 ide_reg_valid_t tf_in_flags;
1105 int data_phase; 1126 int data_phase;
1106 int command_type; 1127 int command_type;