diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:07 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 16:17:07 -0500 |
commit | 9e42237f26cf517a3f682505f03a3a8d89b3b35d (patch) | |
tree | 93b94dd8e1b1d9e257ed3ef84682bf4c0a22ad11 /include/linux/ide.h | |
parent | 2bd06b23e2a099abbf550202f62cd433e01f83e7 (diff) |
ide: add ide_tf_load() helper
Based on the earlier work by Tejun Heo.
* Add 'tf_flags' field (for taskfile flags) to ide_task_t.
* Add IDE_TFLAG_LBA48 taskfile flag for LBA48 taskfiles.
* Add IDE_TFLAG_NO_SELECT_MASK taskfile flag for __ide_do_rw_disk()
which doesn't use SELECT_MASK() (looks like a bug but it requires
some more investigation).
* Split off ide_tf_load() helper from do_rw_taskfile().
* Convert __ide_do_rw_disk() to use ide_tf_load().
There should be no functionality changes caused by this patch.
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r-- | include/linux/ide.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h index 69b78bb39caf..e25fd0b1dd79 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1060,6 +1060,11 @@ extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | |||
1060 | */ | 1060 | */ |
1061 | extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); | 1061 | extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); |
1062 | 1062 | ||
1063 | enum { | ||
1064 | IDE_TFLAG_LBA48 = (1 << 0), | ||
1065 | IDE_TFLAG_NO_SELECT_MASK = (1 << 1), | ||
1066 | }; | ||
1067 | |||
1063 | struct ide_taskfile { | 1068 | struct ide_taskfile { |
1064 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ | 1069 | u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ |
1065 | 1070 | ||
@@ -1094,6 +1099,7 @@ typedef struct ide_task_s { | |||
1094 | struct ide_taskfile tf; | 1099 | struct ide_taskfile tf; |
1095 | u8 tf_array[14]; | 1100 | u8 tf_array[14]; |
1096 | }; | 1101 | }; |
1102 | u8 tf_flags; | ||
1097 | ide_reg_valid_t tf_out_flags; | 1103 | ide_reg_valid_t tf_out_flags; |
1098 | ide_reg_valid_t tf_in_flags; | 1104 | ide_reg_valid_t tf_in_flags; |
1099 | int data_phase; | 1105 | int data_phase; |
@@ -1104,6 +1110,8 @@ typedef struct ide_task_s { | |||
1104 | void *special; /* valid_t generally */ | 1110 | void *special; /* valid_t generally */ |
1105 | } ide_task_t; | 1111 | } ide_task_t; |
1106 | 1112 | ||
1113 | void ide_tf_load(ide_drive_t *, ide_task_t *); | ||
1114 | |||
1107 | extern u32 ide_read_24(ide_drive_t *); | 1115 | extern u32 ide_read_24(ide_drive_t *); |
1108 | 1116 | ||
1109 | extern void SELECT_DRIVE(ide_drive_t *); | 1117 | extern void SELECT_DRIVE(ide_drive_t *); |