diff options
author | David S. Miller <davem@davemloft.net> | 2009-04-13 14:41:05 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 14:41:05 -0700 |
commit | 83400207a07584539366f6859362db6872809a12 (patch) | |
tree | fad187f8b3bebf1b387ec42ef8143e6f4e49a256 /drivers/ide/ide-iops.c | |
parent | 0d489ffb76de0fe804cf06a9d4d11fa7342d74b9 (diff) | |
parent | 80a04d3f2f94fb68b5df05e3ac6697130bc3467a (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
MAINTAINERS
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 27bb70ddd45..c19a221b1e1 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -37,14 +37,11 @@ void SELECT_MASK(ide_drive_t *drive, int mask) u8 ide_read_error(ide_drive_t *drive) { - struct ide_cmd cmd; + struct ide_taskfile tf; - memset(&cmd, 0, sizeof(cmd)); - cmd.tf_flags = IDE_TFLAG_IN_ERROR; + drive->hwif->tp_ops->tf_read(drive, &tf, IDE_VALID_ERROR); - drive->hwif->tp_ops->tf_read(drive, &cmd); - - return cmd.tf.error; + return tf.error; } EXPORT_SYMBOL_GPL(ide_read_error); @@ -312,10 +309,10 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) { ide_hwif_t *hwif = drive->hwif; const struct ide_tp_ops *tp_ops = hwif->tp_ops; + struct ide_taskfile tf; u16 *id = drive->id, i; int error = 0; u8 stat; - struct ide_cmd cmd; #ifdef CONFIG_BLK_DEV_IDEDMA if (hwif->dma_ops) /* check if host supports DMA */ @@ -347,12 +344,11 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) udelay(1); 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.tf.feature = SETFEATURES_XFER; - cmd.tf.nsect = speed; + memset(&tf, 0, sizeof(tf)); + tf.feature = SETFEATURES_XFER; + tf.nsect = speed; - tp_ops->tf_load(drive, &cmd); + tp_ops->tf_load(drive, &tf, IDE_VALID_FEATURE | IDE_VALID_NSECT); tp_ops->exec_command(hwif, ATA_CMD_SET_FEATURES); |