if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;
- if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u8 data[2] = { tf->data, tf->hob_data };
-
- at91_ide_output_data(drive, cmd, data, 2);
- }
-
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
ide_mm_outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
struct ide_io_ports *io_ports = &hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- at91_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 */
ide_mm_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;
- if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u8 data[2] = { tf->data, tf->hob_data };
-
- h8300_output_data(drive, cmd, data, 2);
- }
-
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
struct ide_io_ports *io_ports = &hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- h8300_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 */
outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;
- if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u8 data[2] = { tf->data, tf->hob_data };
-
- ide_output_data(drive, cmd, data, 2);
- }
-
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
tf_outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
tf_inb = ide_inb;
}
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- 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 */
tf_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err)
{
+ const struct ide_tp_ops *tp_ops = drive->hwif->tp_ops;
struct ide_taskfile *tf = &cmd->tf;
struct request *rq = cmd->rq;
u8 tf_cmd = tf->command;
tf->error = err;
tf->status = stat;
- drive->hwif->tp_ops->tf_read(drive, cmd);
+ if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
+ u8 data[2];
+
+ tp_ops->input_data(drive, cmd, data, 2);
+
+ tf->data = data[0];
+ tf->hob_data = data[1];
+ }
+
+ tp_ops->tf_read(drive, cmd);
if ((cmd->tf_flags & IDE_TFLAG_CUSTOM_HANDLER) &&
tf_cmd == ATA_CMD_IDLEIMMEDIATE) {
ide_tf_dump(drive->name, tf);
tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);
SELECT_MASK(drive, 0);
+
+ if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
+ u8 data[2] = { tf->data, tf->hob_data };
+
+ tp_ops->output_data(drive, cmd, data, 2);
+ }
tp_ops->tf_load(drive, cmd);
}
struct ide_io_ports *io_ports = &drive->hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- 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 */
outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;
- if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u8 data[2] = { tf->data, tf->hob_data };
-
- scc_output_data(drive, NULL, data, 2);
- }
-
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
scc_ide_outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
struct ide_io_ports *io_ports = &drive->hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- scc_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 */
scc_ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;
- if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u8 data[2] = { tf->data, tf->hob_data };
-
- hwif->tp_ops->output_data(drive, cmd, data, 2);
- }
-
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
tx4938ide_outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
struct ide_io_ports *io_ports = &hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- hwif->tp_ops->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 */
tx4938ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);
if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;
- if (cmd->ftf_flags & IDE_FTFLAG_OUT_DATA) {
- u8 data[2] = { tf->data, tf->hob_data };
-
- hwif->tp_ops->output_data(drive, cmd, data, 2);
- }
-
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
tx4939ide_outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
struct ide_io_ports *io_ports = &hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
- if (cmd->ftf_flags & IDE_FTFLAG_IN_DATA) {
- u8 data[2];
-
- hwif->tp_ops->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 */
tx4939ide_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);