ide: call {in|out}put_data() methods from tf_{read|load}() methods (take 2)

Handle IDE_FTFLAG_{IN|OUT}_DATA flags in tf_{read|load}() methods by calling
{in|out}put_data() methods to transfer 2 bytes -- this will allow us to move
that handling out of those methods altogether...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Sergei Shtylyov
2009-03-31 20:15:31 +02:00
committed by Bartlomiej Zolnierkiewicz
父節點 deae17fd5d
當前提交 bac08cee93
共有 7 個文件被更改,包括 52 次插入48 次删除

查看文件

@@ -67,10 +67,12 @@ static void superio_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
struct ide_taskfile *tf = &cmd->tf;
if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
u16 data = inw(io_ports->data_addr);
u8 data[2];
tf->data = data & 0xff;
tf->hob_data = (data >> 8) & 0xff;
ide_input_data(drive, cmd, data, 2);
tf->data = data[0];
tf->hob_data = data[1];
}
/* be sure we're looking at the low order bits */