aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-taskfile.c25
-rw-r--r--include/linux/ide.h2
2 files changed, 13 insertions, 14 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 1a34edb183ec..5f6d01a4222c 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -170,23 +170,25 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
170 170
171 ide_tf_load(drive, task); 171 ide_tf_load(drive, task);
172 172
173 if (task->handler != NULL) { 173 switch (task->data_phase) {
174 if (task->prehandler != NULL) { 174 case TASKFILE_MULTI_OUT:
175 hwif->OUTBSYNC(drive, tf->command, IDE_COMMAND_REG); 175 case TASKFILE_OUT:
176 ndelay(400); /* FIXME */ 176 hwif->OUTBSYNC(drive, tf->command, IDE_COMMAND_REG);
177 return task->prehandler(drive, task->rq); 177 ndelay(400); /* FIXME */
178 } 178 return pre_task_out_intr(drive, task->rq);
179 case TASKFILE_MULTI_IN:
180 case TASKFILE_IN:
181 case TASKFILE_NO_DATA:
179 ide_execute_command(drive, tf->command, task->handler, WAIT_WORSTCASE, NULL); 182 ide_execute_command(drive, tf->command, task->handler, WAIT_WORSTCASE, NULL);
180 return ide_started; 183 return ide_started;
181 } 184 default:
182 185 if (task_dma_ok(task) == 0 || drive->using_dma == 0 ||
183 if (task_dma_ok(task) && drive->using_dma && !hwif->dma_setup(drive)) { 186 hwif->dma_setup(drive))
187 return ide_stopped;
184 hwif->dma_exec_cmd(drive, tf->command); 188 hwif->dma_exec_cmd(drive, tf->command);
185 hwif->dma_start(drive); 189 hwif->dma_start(drive);
186 return ide_started; 190 return ide_started;
187 } 191 }
188
189 return ide_stopped;
190} 192}
191 193
192/* 194/*
@@ -665,7 +667,6 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
665 } 667 }
666 /* fall through */ 668 /* fall through */
667 case TASKFILE_OUT: 669 case TASKFILE_OUT:
668 args.prehandler = &pre_task_out_intr;
669 args.handler = &task_out_intr; 670 args.handler = &task_out_intr;
670 /* fall through */ 671 /* fall through */
671 case TASKFILE_OUT_DMAQ: 672 case TASKFILE_OUT_DMAQ:
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 849447572a6b..2c28fb75915a 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -626,7 +626,6 @@ typedef struct hwif_s {
626/* 626/*
627 * internal ide interrupt handler type 627 * internal ide interrupt handler type
628 */ 628 */
629typedef ide_startstop_t (ide_pre_handler_t)(ide_drive_t *, struct request *);
630typedef ide_startstop_t (ide_handler_t)(ide_drive_t *); 629typedef ide_startstop_t (ide_handler_t)(ide_drive_t *);
631typedef int (ide_expiry_t)(ide_drive_t *); 630typedef int (ide_expiry_t)(ide_drive_t *);
632 631
@@ -950,7 +949,6 @@ typedef struct ide_task_s {
950 }; 949 };
951 u32 tf_flags; 950 u32 tf_flags;
952 int data_phase; 951 int data_phase;
953 ide_pre_handler_t *prehandler;
954 ide_handler_t *handler; 952 ide_handler_t *handler;
955 struct request *rq; /* copy of request */ 953 struct request *rq; /* copy of request */
956 void *special; /* valid_t generally */ 954 void *special; /* valid_t generally */