Commit 6cd5b33c authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] cleanup taskfile submit

We don't need to care about the request, just look purely at the
taskfile itself.
parent 6f59b75a
...@@ -183,20 +183,11 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -183,20 +183,11 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
return task->prehandler(drive, task->rq); return task->prehandler(drive, task->rq);
return ide_started; return ide_started;
} }
/* for dma commands we down set the handler */
if (blk_fs_request(task->rq) && drive->using_dma) { if (!drive->using_dma)
if (rq_data_dir(task->rq) == READ) {
if (hwif->ide_dma_read(drive))
return ide_stopped;
} else {
if (hwif->ide_dma_write(drive))
return ide_stopped;
}
} else {
if (!drive->using_dma && (task->handler == NULL))
return ide_stopped; return ide_stopped;
switch(taskfile->command) { switch (taskfile->command) {
case WIN_WRITEDMA_ONCE: case WIN_WRITEDMA_ONCE:
case WIN_WRITEDMA: case WIN_WRITEDMA:
case WIN_WRITEDMA_EXT: case WIN_WRITEDMA_EXT:
...@@ -214,8 +205,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) ...@@ -214,8 +205,8 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task)
if (task->handler == NULL) if (task->handler == NULL)
return ide_stopped; return ide_stopped;
} }
}
return ide_started; return ide_stopped;
} }
EXPORT_SYMBOL(do_rw_taskfile); EXPORT_SYMBOL(do_rw_taskfile);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment