mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-12 06:42:12 +00:00
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>
This commit is contained in:
parent
e193c3e141
commit
07fe69d5d0
@ -62,25 +62,6 @@ int taskfile_lib_get_identify (ide_drive_t *drive, u8 *buf)
|
|||||||
return ide_raw_taskfile(drive, &args, buf, 1);
|
return ide_raw_taskfile(drive, &args, buf, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int inline task_dma_ok(ide_task_t *task)
|
|
||||||
{
|
|
||||||
if (blk_fs_request(task->rq) || (task->tf_flags & IDE_TFLAG_FLAGGED))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
switch (task->tf.command) {
|
|
||||||
case WIN_WRITEDMA_ONCE:
|
|
||||||
case WIN_WRITEDMA:
|
|
||||||
case WIN_WRITEDMA_EXT:
|
|
||||||
case WIN_READDMA_ONCE:
|
|
||||||
case WIN_READDMA:
|
|
||||||
case WIN_READDMA_EXT:
|
|
||||||
case WIN_IDENTIFY_DMA:
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static ide_startstop_t task_no_data_intr(ide_drive_t *);
|
static ide_startstop_t task_no_data_intr(ide_drive_t *);
|
||||||
static ide_startstop_t set_geometry_intr(ide_drive_t *);
|
static ide_startstop_t set_geometry_intr(ide_drive_t *);
|
||||||
static ide_startstop_t recal_intr(ide_drive_t *);
|
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)
|
|||||||
WAIT_WORSTCASE, NULL);
|
WAIT_WORSTCASE, NULL);
|
||||||
return ide_started;
|
return ide_started;
|
||||||
default:
|
default:
|
||||||
if (task_dma_ok(task) == 0 || drive->using_dma == 0 ||
|
if (drive->using_dma == 0 || dma_ops->dma_setup(drive))
|
||||||
dma_ops->dma_setup(drive))
|
|
||||||
return ide_stopped;
|
return ide_stopped;
|
||||||
dma_ops->dma_exec_cmd(drive, tf->command);
|
dma_ops->dma_exec_cmd(drive, tf->command);
|
||||||
dma_ops->dma_start(drive);
|
dma_ops->dma_start(drive);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user