diff options
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
| -rw-r--r-- | drivers/ide/ide-taskfile.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index cf55a48a7dd2..1fbdb746dc88 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
| @@ -8,28 +8,18 @@ | |||
| 8 | * The big the bad and the ugly. | 8 | * The big the bad and the ugly. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/module.h> | ||
| 12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 13 | #include <linux/string.h> | 12 | #include <linux/string.h> |
| 14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 15 | #include <linux/timer.h> | ||
| 16 | #include <linux/mm.h> | ||
| 17 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
| 18 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
| 19 | #include <linux/major.h> | ||
| 20 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
| 21 | #include <linux/genhd.h> | ||
| 22 | #include <linux/blkpg.h> | ||
| 23 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
| 24 | #include <linux/pci.h> | ||
| 25 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
| 26 | #include <linux/hdreg.h> | 19 | #include <linux/hdreg.h> |
| 27 | #include <linux/ide.h> | 20 | #include <linux/ide.h> |
| 28 | #include <linux/bitops.h> | ||
| 29 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
| 30 | 22 | ||
| 31 | #include <asm/byteorder.h> | ||
| 32 | #include <asm/irq.h> | ||
| 33 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
| 34 | #include <asm/io.h> | 24 | #include <asm/io.h> |
| 35 | 25 | ||
| @@ -62,25 +52,6 @@ int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf) | |||
| 62 | return ide_raw_taskfile(drive, &args, buf, 1); | 52 | return ide_raw_taskfile(drive, &args, buf, 1); |
| 63 | } | 53 | } |
| 64 | 54 | ||
| 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 *); | 55 | static ide_startstop_t task_no_data_intr(ide_drive_t *); |
| 85 | static ide_startstop_t set_geometry_intr(ide_drive_t *); | 56 | static ide_startstop_t set_geometry_intr(ide_drive_t *); |
| 86 | static ide_startstop_t recal_intr(ide_drive_t *); | 57 | static ide_startstop_t recal_intr(ide_drive_t *); |
| @@ -139,8 +110,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
| 139 | WAIT_WORSTCASE, NULL); | 110 | WAIT_WORSTCASE, NULL); |
| 140 | return ide_started; | 111 | return ide_started; |
| 141 | default: | 112 | default: |
| 142 | if (task_dma_ok(task) == 0 || drive->using_dma == 0 || | 113 | if (drive->using_dma == 0 || dma_ops->dma_setup(drive)) |
| 143 | dma_ops->dma_setup(drive)) | ||
| 144 | return ide_stopped; | 114 | return ide_stopped; |
| 145 | dma_ops->dma_exec_cmd(drive, tf->command); | 115 | dma_ops->dma_exec_cmd(drive, tf->command); |
| 146 | dma_ops->dma_start(drive); | 116 | dma_ops->dma_start(drive); |
| @@ -183,7 +153,6 @@ static ide_startstop_t set_geometry_intr(ide_drive_t *drive) | |||
| 183 | if (stat & (ERR_STAT|DRQ_STAT)) | 153 | if (stat & (ERR_STAT|DRQ_STAT)) |
| 184 | return ide_error(drive, "set_geometry_intr", stat); | 154 | return ide_error(drive, "set_geometry_intr", stat); |
| 185 | 155 | ||
| 186 | BUG_ON(HWGROUP(drive)->handler != NULL); | ||
| 187 | ide_set_handler(drive, &set_geometry_intr, WAIT_WORSTCASE, NULL); | 156 | ide_set_handler(drive, &set_geometry_intr, WAIT_WORSTCASE, NULL); |
| 188 | return ide_started; | 157 | return ide_started; |
| 189 | } | 158 | } |
