diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:43 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:43 -0400 |
commit | 07fe69d5d0b6e476cecaf75e81c0c6093571087b (patch) | |
tree | 7baba66849ab727b4587b557d2ed2457f15ca8f1 /drivers/ide/ide-taskfile.c | |
parent | e193c3e141df4b536ed077b29c83a96768333607 (diff) |
ide: allow any command requesting DMA data phase for HDIO_DRIVE_TASKFILE
Allow any command requesting DMA data phase for HDIO_DRIVE_TASKFILE ioctl
and remove no longer needed task_dma_ok()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index cf55a48a7dd2..994a5161c040 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -62,25 +62,6 @@ int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) | |||
62 | return ide_raw_taskfile(drive, &args, buf, 1); | 62 | return ide_raw_taskfile(drive, &args, buf, 1); |
63 | } | 63 | } |
64 | 64 | ||
65 | static int inline task_dma_ok(ide_task_t *task) | ||
66 | { | ||
67 | if (blk_fs_request(task->rq) || (task->tf_flags & IDE_TFLAG_FLAGGED)) | ||
68 | return 1; | ||
69 | |||
70 | switch (task->tf.command) { | ||
71 | case WIN_WRITEDMA_ONCE: | ||
72 | case WIN_WRITEDMA: | ||
73 | case WIN_WRITEDMA_EXT: | ||
74 | case WIN_READDMA_ONCE: | ||
75 | case WIN_READDMA: | ||
76 | case WIN_READDMA_EXT: | ||
77 | case WIN_IDENTIFY_DMA: | ||
78 | return 1; | ||
79 | } | ||
80 | |||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | static ide_startstop_t task_no_data_intr(ide_drive_t *); | 65 | static ide_startstop_t task_no_data_intr(ide_drive_t *); |
85 | static ide_startstop_t set_geometry_intr(ide_drive_t *); | 66 | static ide_startstop_t set_geometry_intr(ide_drive_t *); |
86 | static ide_startstop_t recal_intr(ide_drive_t *); | 67 | static ide_startstop_t recal_intr(ide_drive_t *); |
@@ -139,8 +120,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
139 | WAIT_WORSTCASE, NULL); | 120 | WAIT_WORSTCASE, NULL); |
140 | return ide_started; | 121 | return ide_started; |
141 | default: | 122 | default: |
142 | if (task_dma_ok(task) == 0 || drive->using_dma == 0 || | 123 | if (drive->using_dma == 0 || dma_ops->dma_setup(drive)) |
143 | dma_ops->dma_setup(drive)) | ||
144 | return ide_stopped; | 124 | return ide_stopped; |
145 | dma_ops->dma_exec_cmd(drive, tf->command); | 125 | dma_ops->dma_exec_cmd(drive, tf->command); |
146 | dma_ops->dma_start(drive); | 126 | dma_ops->dma_start(drive); |