This is a new version of ide_do_taskfile.patch. Compared to theoriginal do_rw_task(), only one more 'if' is used in the hot path, soI think the performance issue can be ignored now. Also, there's nouserland visible change with this patch. Everything should work justas it did with do_rw_taskfile()/flagged_taskfile().

do_taskfile() is different from do_rw_taskfile() in that

- It uses task->data_phase to determine whether it's a DMA command or not.