]> err.no Git - linux-2.6/commitdiff
ide: merge flagged_taskfile() into do_rw_taskfile()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:15 +0000 (22:17 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 25 Jan 2008 21:17:15 +0000 (22:17 +0100)
Based on the earlier work by Tejun Heo.

task->data_phase == TASKFILE_MULTI_{IN,OUT} vs drive->mult_count == 0
check is needed also for ide_taskfile_ioctl() requests that don't have
IDE_TFLAG_FLAGGED taskfile flag set.

Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-io.c
drivers/ide/ide-taskfile.c
include/linux/ide.h

index 1112d8b049b9d7d621f6ecce1113390e20bedb74..1af2cc4f864e30aad1bacb5451fd24d412cb6022 100644 (file)
@@ -851,9 +851,6 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
                        break;
                }
 
-               if (task->tf_flags & IDE_TFLAG_FLAGGED)
-                       return flagged_taskfile(drive, task);
-
                return do_rw_taskfile(drive, task);
        }
 
index 03c4a0c55bf41338cdfef26b6155d634e6e5be1d..1a34edb183ecf5eef469f01d1824853be68a08ed 100644 (file)
@@ -156,6 +156,18 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
        ide_hwif_t *hwif        = HWIF(drive);
        struct ide_taskfile *tf = &task->tf;
 
+       if (task->data_phase == TASKFILE_MULTI_IN ||
+           task->data_phase == TASKFILE_MULTI_OUT) {
+               if (!drive->mult_count) {
+                       printk(KERN_ERR "%s: multimode not set!\n",
+                                       drive->name);
+                       return ide_stopped;
+               }
+       }
+
+       if (task->tf_flags & IDE_TFLAG_FLAGGED)
+               task->tf_flags |= IDE_TFLAG_FLAGGED_SET_IN_FLAGS;
+
        ide_tf_load(drive, task);
 
        if (task->handler != NULL) {
@@ -839,23 +851,3 @@ int ide_task_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
 
        return err;
 }
-
-/*
- * NOTICE: This is additions from IBM to provide a discrete interface,
- * for selective taskregister access operations.  Nice JOB Klaus!!!
- * Glad to be able to work and co-develop this with you and IBM.
- */
-ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task)
-{
-       if (task->data_phase == TASKFILE_MULTI_IN ||
-           task->data_phase == TASKFILE_MULTI_OUT) {
-               if (!drive->mult_count) {
-                       printk(KERN_ERR "%s: multimode not set!\n", drive->name);
-                       return ide_stopped;
-               }
-       }
-
-       task->tf_flags |= IDE_TFLAG_FLAGGED_SET_IN_FLAGS;
-
-       return do_rw_taskfile(drive, task);
-}
index c23ef2df2cbbc3a65fcc3d50b2fdaa17e07a6b17..849447572a6b6c9727abf02f209717005a78a2c4 100644 (file)
@@ -972,11 +972,6 @@ void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8);
  */
 extern ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);
 
-/*
- * Special Flagged Register Validation Caller
- */
-extern ide_startstop_t flagged_taskfile(ide_drive_t *, ide_task_t *);
-
 extern ide_startstop_t set_multmode_intr(ide_drive_t *);
 extern ide_startstop_t set_geometry_intr(ide_drive_t *);
 extern ide_startstop_t recal_intr(ide_drive_t *);