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>
This commit is contained in:
@@ -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 *);
|
||||
|
Reference in New Issue
Block a user