diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 22:17:07 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-25 22:17:07 +0100 |
commit | 9e42237f26cf517a3f682505f03a3a8d89b3b35d (patch) | |
tree | 93b94dd8e1b1d9e257ed3ef84682bf4c0a22ad11 /include/linux | |
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')
-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 69b78bb39ca..e25fd0b1dd7 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); */ extern int ide_wait_cmd(ide_drive_t *, u8, u8, u8, u8, u8 *); +enum { + IDE_TFLAG_LBA48 = (1 << 0), + IDE_TFLAG_NO_SELECT_MASK = (1 << 1), +}; + struct ide_taskfile { u8 hob_data; /* 0: high data byte (for TASKFILE IOCTL) */ @@ -1094,6 +1099,7 @@ typedef struct ide_task_s { struct ide_taskfile tf; u8 tf_array[14]; }; + u8 tf_flags; ide_reg_valid_t tf_out_flags; ide_reg_valid_t tf_in_flags; int data_phase; @@ -1104,6 +1110,8 @@ typedef struct ide_task_s { void *special; /* valid_t generally */ } ide_task_t; +void ide_tf_load(ide_drive_t *, ide_task_t *); + extern u32 ide_read_24(ide_drive_t *); extern void SELECT_DRIVE(ide_drive_t *); |