ide: add struct ide_taskfile (take 2)
[linux-2.6.git] / drivers / ide / ide-iops.c
index f4e8a0c..4aac1cc 100644 (file)
@@ -642,9 +642,9 @@ no_80w:
 
 int ide_ata66_check (ide_drive_t *drive, ide_task_t *args)
 {
-       if ((args->tfRegister[IDE_COMMAND_OFFSET] == WIN_SETFEATURES) &&
-           (args->tfRegister[IDE_SECTOR_OFFSET] > XFER_UDMA_2) &&
-           (args->tfRegister[IDE_FEATURE_OFFSET] == SETFEATURES_XFER)) {
+       if (args->tf.command == WIN_SETFEATURES &&
+           args->tf.lbal > XFER_UDMA_2 &&
+           args->tf.feature == SETFEATURES_XFER) {
                if (eighty_ninty_three(drive) == 0) {
                        printk(KERN_WARNING "%s: UDMA speeds >UDMA33 cannot "
                                            "be set\n", drive->name);
@@ -662,9 +662,9 @@ int ide_ata66_check (ide_drive_t *drive, ide_task_t *args)
  */
 int set_transfer (ide_drive_t *drive, ide_task_t *args)
 {
-       if ((args->tfRegister[IDE_COMMAND_OFFSET] == WIN_SETFEATURES) &&
-           (args->tfRegister[IDE_SECTOR_OFFSET] >= XFER_SW_DMA_0) &&
-           (args->tfRegister[IDE_FEATURE_OFFSET] == SETFEATURES_XFER) &&
+       if (args->tf.command == WIN_SETFEATURES &&
+           args->tf.lbal >= XFER_SW_DMA_0 &&
+           args->tf.feature == SETFEATURES_XFER &&
            (drive->id->dma_ultra ||
             drive->id->dma_mword ||
             drive->id->dma_1word))