Skip to content

Commit

Permalink
ide: replace IDE_TFLAG_* flags by IDE_VALID_*
Browse files Browse the repository at this point in the history
Replace IDE_TFLAG_{IN|OUT}_* flags meaning to the taskfile register validity on
input/output by the IDE_VALID_* flags and introduce 4 symmetric 8-bit register
validity indicator subfields, 'valid.{input/output}.{tf|hob}', into the 'struct
ide_cmd' instead of using the 'tf_flags' field for that purpose (this field can
then be turned from 32-bit into 8-bit one).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Sergei Shtylyov authored and bzolnier committed Apr 8, 2009
1 parent 674f0ea commit 60f8501
Show file tree
Hide file tree
Showing 18 changed files with 197 additions and 175 deletions.
3 changes: 2 additions & 1 deletion drivers/ide/ide-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ static int do_drive_set_taskfiles(ide_drive_t *drive,
/* convert GTF to taskfile */
memset(&cmd, 0, sizeof(cmd));
memcpy(&cmd.tf_array[7], gtf, REGS_PER_GTF);
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

err = ide_no_data_taskfile(drive, &cmd);
if (err) {
Expand Down
21 changes: 10 additions & 11 deletions drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ void ide_read_bcount_and_ireason(ide_drive_t *drive, u16 *bcount, u8 *ireason)
struct ide_cmd cmd;

memset(&cmd, 0, sizeof(cmd));
cmd.tf_flags = IDE_TFLAG_IN_LBAH | IDE_TFLAG_IN_LBAM |
IDE_TFLAG_IN_NSECT;
cmd.valid.in.tf = IDE_VALID_LBAH | IDE_VALID_LBAM | IDE_VALID_NSECT;

drive->hwif->tp_ops->tf_read(drive, &cmd);

Expand Down Expand Up @@ -439,12 +438,12 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
return ide_started;
}

static void ide_init_packet_cmd(struct ide_cmd *cmd, u32 tf_flags,
static void ide_init_packet_cmd(struct ide_cmd *cmd, u8 valid_tf,
u16 bcount, u8 dma)
{
cmd->protocol = dma ? ATAPI_PROT_DMA : ATAPI_PROT_PIO;
cmd->tf_flags |= IDE_TFLAG_OUT_LBAH | IDE_TFLAG_OUT_LBAM |
IDE_TFLAG_OUT_FEATURE | tf_flags;
cmd->protocol = dma ? ATAPI_PROT_DMA : ATAPI_PROT_PIO;
cmd->valid.out.tf = IDE_VALID_LBAH | IDE_VALID_LBAM |
IDE_VALID_FEATURE | valid_tf;
cmd->tf.command = ATA_CMD_PACKET;
cmd->tf.feature = dma; /* Use PIO/DMA */
cmd->tf.lbam = bcount & 0xff;
Expand All @@ -456,7 +455,7 @@ static u8 ide_read_ireason(ide_drive_t *drive)
struct ide_cmd cmd;

memset(&cmd, 0, sizeof(cmd));
cmd.tf_flags = IDE_TFLAG_IN_NSECT;
cmd.valid.in.tf = IDE_VALID_NSECT;

drive->hwif->tp_ops->tf_read(drive, &cmd);

Expand Down Expand Up @@ -588,12 +587,12 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
ide_expiry_t *expiry = NULL;
struct request *rq = hwif->rq;
unsigned int timeout;
u32 tf_flags;
u16 bcount;
u8 valid_tf;
u8 drq_int = !!(drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT);

if (dev_is_idecd(drive)) {
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
valid_tf = IDE_VALID_NSECT | IDE_VALID_LBAL;
bcount = ide_cd_get_xferlen(rq);
expiry = ide_cd_expiry;
timeout = ATAPI_WAIT_PC;
Expand All @@ -607,7 +606,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
pc->xferred = 0;
pc->cur_pos = pc->buf;

tf_flags = IDE_TFLAG_OUT_DEVICE;
valid_tf = IDE_VALID_DEVICE;
bcount = ((drive->media == ide_tape) ?
pc->req_xfer :
min(pc->req_xfer, 63 * 1024));
Expand All @@ -627,7 +626,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_cmd *cmd)
: WAIT_TAPE_CMD;
}

ide_init_packet_cmd(cmd, tf_flags, bcount, drive->dma);
ide_init_packet_cmd(cmd, valid_tf, bcount, drive->dma);

(void)do_rw_taskfile(drive, cmd);

Expand Down
40 changes: 27 additions & 13 deletions drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
}

memset(&cmd, 0, sizeof(cmd));
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

if (drive->dev_flags & IDE_DFLAG_LBA) {
if (lba48) {
Expand All @@ -116,7 +117,9 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
tf->lbam = (u8)(block >> 8);
tf->lbah = (u8)(block >> 16);

cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
cmd.valid.out.hob = IDE_VALID_OUT_HOB;
cmd.valid.in.hob = IDE_VALID_IN_HOB;
cmd.tf_flags |= IDE_TFLAG_LBA48;
} else {
tf->nsect = nsectors & 0xff;
tf->lbal = block;
Expand Down Expand Up @@ -220,9 +223,13 @@ static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48)
tf->command = ATA_CMD_READ_NATIVE_MAX;
tf->device = ATA_LBA;

cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
if (lba48)
cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;
if (lba48) {
cmd.valid.out.hob = IDE_VALID_OUT_HOB;
cmd.valid.in.hob = IDE_VALID_IN_HOB;
cmd.tf_flags = IDE_TFLAG_LBA48;
}

ide_no_data_taskfile(drive, &cmd);

Expand Down Expand Up @@ -260,9 +267,13 @@ static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48)
}
tf->device |= ATA_LBA;

cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
if (lba48)
cmd.tf_flags |= (IDE_TFLAG_LBA48 | IDE_TFLAG_HOB);
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;
if (lba48) {
cmd.valid.out.hob = IDE_VALID_OUT_HOB;
cmd.valid.in.hob = IDE_VALID_IN_HOB;
cmd.tf_flags = IDE_TFLAG_LBA48;
}

ide_no_data_taskfile(drive, &cmd);

Expand Down Expand Up @@ -395,8 +406,8 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
cmd->tf.command = ATA_CMD_FLUSH_EXT;
else
cmd->tf.command = ATA_CMD_FLUSH;
cmd->tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_OUT_DEVICE |
IDE_TFLAG_DYN;
cmd->valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd->tf_flags = IDE_TFLAG_DYN;
cmd->protocol = ATA_PROT_NODATA;

rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
Expand Down Expand Up @@ -457,7 +468,8 @@ static int ide_do_setfeature(ide_drive_t *drive, u8 feature, u8 nsect)
cmd.tf.feature = feature;
cmd.tf.nsect = nsect;
cmd.tf.command = ATA_CMD_SET_FEATURES;
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

return ide_no_data_taskfile(drive, &cmd);
}
Expand Down Expand Up @@ -533,7 +545,8 @@ static int do_idedisk_flushcache(ide_drive_t *drive)
cmd.tf.command = ATA_CMD_FLUSH_EXT;
else
cmd.tf.command = ATA_CMD_FLUSH;
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

return ide_no_data_taskfile(drive, &cmd);
}
Expand Down Expand Up @@ -715,7 +728,8 @@ static int ide_disk_set_doorlock(ide_drive_t *drive, struct gendisk *disk,

memset(&cmd, 0, sizeof(cmd));
cmd.tf.command = on ? ATA_CMD_MEDIA_LOCK : ATA_CMD_MEDIA_UNLOCK;
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

ret = ide_no_data_taskfile(drive, &cmd);

Expand Down
6 changes: 4 additions & 2 deletions drivers/ide/ide-disk_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ static int smart_enable(ide_drive_t *drive)
tf->lbam = ATA_SMART_LBAM_PASS;
tf->lbah = ATA_SMART_LBAH_PASS;
tf->command = ATA_CMD_SMART;
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

return ide_no_data_taskfile(drive, &cmd);
}
Expand All @@ -29,7 +30,8 @@ static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd)
tf->lbam = ATA_SMART_LBAM_PASS;
tf->lbah = ATA_SMART_LBAH_PASS;
tf->command = ATA_CMD_SMART;
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;
cmd.protocol = ATA_PROT_PIO;

return ide_raw_taskfile(drive, &cmd, buf, 1);
Expand Down
50 changes: 28 additions & 22 deletions drivers/ide/ide-io-std.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
struct ide_io_ports *io_ports = &hwif->io_ports;
struct ide_taskfile *tf = &cmd->tf;
void (*tf_outb)(u8 addr, unsigned long port);
u8 valid = cmd->valid.out.hob;
u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;
u8 HIHI = (cmd->tf_flags & IDE_TFLAG_LBA48) ? 0xE0 : 0xEF;

Expand All @@ -102,29 +103,31 @@ void ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
if (cmd->ftf_flags & IDE_FTFLAG_FLAGGED)
HIHI = 0xFF;

if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_FEATURE)
if (valid & IDE_VALID_FEATURE)
tf_outb(tf->hob_feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_NSECT)
if (valid & IDE_VALID_NSECT)
tf_outb(tf->hob_nsect, io_ports->nsect_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAL)
if (valid & IDE_VALID_LBAL)
tf_outb(tf->hob_lbal, io_ports->lbal_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAM)
if (valid & IDE_VALID_LBAM)
tf_outb(tf->hob_lbam, io_ports->lbam_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_HOB_LBAH)
if (valid & IDE_VALID_LBAH)
tf_outb(tf->hob_lbah, io_ports->lbah_addr);

if (cmd->tf_flags & IDE_TFLAG_OUT_FEATURE)
valid = cmd->valid.out.tf;

if (valid & IDE_VALID_FEATURE)
tf_outb(tf->feature, io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_NSECT)
if (valid & IDE_VALID_NSECT)
tf_outb(tf->nsect, io_ports->nsect_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_LBAL)
if (valid & IDE_VALID_LBAL)
tf_outb(tf->lbal, io_ports->lbal_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_LBAM)
if (valid & IDE_VALID_LBAM)
tf_outb(tf->lbam, io_ports->lbam_addr);
if (cmd->tf_flags & IDE_TFLAG_OUT_LBAH)
if (valid & IDE_VALID_LBAH)
tf_outb(tf->lbah, io_ports->lbah_addr);

if (cmd->tf_flags & IDE_TFLAG_OUT_DEVICE)
if (valid & IDE_VALID_DEVICE)
tf_outb((tf->device & HIHI) | drive->select,
io_ports->device_addr);
}
Expand All @@ -137,6 +140,7 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
struct ide_taskfile *tf = &cmd->tf;
void (*tf_outb)(u8 addr, unsigned long port);
u8 (*tf_inb)(unsigned long port);
u8 valid = cmd->valid.in.tf;
u8 mmio = (hwif->host_flags & IDE_HFLAG_MMIO) ? 1 : 0;

if (mmio) {
Expand All @@ -150,31 +154,33 @@ void ide_tf_read(ide_drive_t *drive, struct ide_cmd *cmd)
/* be sure we're looking at the low order bits */
tf_outb(ATA_DEVCTL_OBS, io_ports->ctl_addr);

if (cmd->tf_flags & IDE_TFLAG_IN_ERROR)
if (valid & IDE_VALID_ERROR)
tf->error = tf_inb(io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_NSECT)
if (valid & IDE_VALID_NSECT)
tf->nsect = tf_inb(io_ports->nsect_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_LBAL)
if (valid & IDE_VALID_LBAL)
tf->lbal = tf_inb(io_ports->lbal_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_LBAM)
if (valid & IDE_VALID_LBAM)
tf->lbam = tf_inb(io_ports->lbam_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_LBAH)
if (valid & IDE_VALID_LBAH)
tf->lbah = tf_inb(io_ports->lbah_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_DEVICE)
if (valid & IDE_VALID_DEVICE)
tf->device = tf_inb(io_ports->device_addr);

if (cmd->tf_flags & IDE_TFLAG_LBA48) {
tf_outb(ATA_HOB | ATA_DEVCTL_OBS, io_ports->ctl_addr);

if (cmd->tf_flags & IDE_TFLAG_IN_HOB_ERROR)
valid = cmd->valid.in.hob;

if (valid & IDE_VALID_ERROR)
tf->hob_error = tf_inb(io_ports->feature_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_HOB_NSECT)
if (valid & IDE_VALID_NSECT)
tf->hob_nsect = tf_inb(io_ports->nsect_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAL)
if (valid & IDE_VALID_LBAL)
tf->hob_lbal = tf_inb(io_ports->lbal_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAM)
if (valid & IDE_VALID_LBAM)
tf->hob_lbam = tf_inb(io_ports->lbam_addr);
if (cmd->tf_flags & IDE_TFLAG_IN_HOB_LBAH)
if (valid & IDE_VALID_LBAH)
tf->hob_lbah = tf_inb(io_ports->lbah_addr);
}
}
Expand Down
5 changes: 3 additions & 2 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive)
return ide_stopped;
}

cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE |
IDE_TFLAG_CUSTOM_HANDLER;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;
cmd.tf_flags = IDE_TFLAG_CUSTOM_HANDLER;

do_rw_taskfile(drive, &cmd);

Expand Down
10 changes: 6 additions & 4 deletions drivers/ide/ide-ioctls.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
tf->lbal = args[1];
tf->lbam = 0x4f;
tf->lbah = 0xc2;
cmd.tf_flags = IDE_TFLAG_OUT_TF | IDE_TFLAG_IN_NSECT;
cmd.valid.out.tf = IDE_VALID_OUT_TF;
cmd.valid.in.tf = IDE_VALID_NSECT;
} else {
tf->nsect = args[1];
cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT |
IDE_TFLAG_IN_NSECT;
cmd.valid.out.tf = IDE_VALID_FEATURE | IDE_VALID_NSECT;
cmd.valid.in.tf = IDE_VALID_NSECT;
}
tf->command = args[0];
cmd.protocol = args[3] ? ATA_PROT_PIO : ATA_PROT_NODATA;
Expand Down Expand Up @@ -207,7 +208,8 @@ static int ide_task_ioctl(ide_drive_t *drive, unsigned long arg)
memset(&cmd, 0, sizeof(cmd));
memcpy(&cmd.tf_array[7], &args[1], 6);
cmd.tf.command = args[0];
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;

err = ide_no_data_taskfile(drive, &cmd);

Expand Down
4 changes: 2 additions & 2 deletions drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ u8 ide_read_error(ide_drive_t *drive)
struct ide_cmd cmd;

memset(&cmd, 0, sizeof(cmd));
cmd.tf_flags = IDE_TFLAG_IN_ERROR;
cmd.valid.in.tf = IDE_VALID_ERROR;

drive->hwif->tp_ops->tf_read(drive, &cmd);

Expand Down Expand Up @@ -348,7 +348,7 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
tp_ops->write_devctl(hwif, ATA_NIEN | ATA_DEVCTL_OBS);

memset(&cmd, 0, sizeof(cmd));
cmd.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT;
cmd.valid.out.tf = IDE_VALID_FEATURE | IDE_VALID_NSECT;
cmd.tf.feature = SETFEATURES_XFER;
cmd.tf.nsect = speed;

Expand Down
11 changes: 6 additions & 5 deletions drivers/ide/ide-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ static void ide_dump_sector(ide_drive_t *drive)
u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48);

memset(&cmd, 0, sizeof(cmd));
if (lba48)
cmd.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_HOB_LBA |
IDE_TFLAG_LBA48;
else
cmd.tf_flags = IDE_TFLAG_IN_LBA | IDE_TFLAG_IN_DEVICE;
if (lba48) {
cmd.valid.in.tf = IDE_VALID_LBA;
cmd.valid.in.hob = IDE_VALID_LBA;
cmd.tf_flags = IDE_TFLAG_LBA48;
} else
cmd.valid.in.tf = IDE_VALID_LBA | IDE_VALID_DEVICE;

drive->hwif->tp_ops->tf_read(drive, &cmd);

Expand Down
3 changes: 2 additions & 1 deletion drivers/ide/ide-park.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq)
tf->lbal = 0x4c;
tf->lbam = 0x4e;
tf->lbah = 0x55;
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd.valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd.valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;
} else /* cmd == REQ_UNPARK_HEADS */
tf->command = ATA_CMD_CHK_POWER;

Expand Down
3 changes: 2 additions & 1 deletion drivers/ide/ide-pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq)
return ide_stopped;

out_do_tf:
cmd->tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
cmd->valid.out.tf = IDE_VALID_OUT_TF | IDE_VALID_DEVICE;
cmd->valid.in.tf = IDE_VALID_IN_TF | IDE_VALID_DEVICE;
cmd->protocol = ATA_PROT_NODATA;

return do_rw_taskfile(drive, cmd);
Expand Down
Loading

0 comments on commit 60f8501

Please sign in to comment.