[PATCH 10/14] ide: allow any command requesting DMA data phase for HDIO_DRIVE_TASKFILE

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>, <linux-kernel@...>
Date: Tuesday, June 10, 2008 - 4:52 pm

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>
---
 drivers/ide/ide-taskfile.c |   22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

Index: b/drivers/ide/ide-taskfile.c
===================================================================
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -62,25 +62,6 @@ int taskfile_lib_get_identify (ide_drive
 	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 set_geometry_intr(ide_drive_t *);
 static ide_startstop_t recal_intr(ide_drive_t *);
@@ -139,8 +120,7 @@ ide_startstop_t do_rw_taskfile (ide_driv
 				    WAIT_WORSTCASE, NULL);
 		return ide_started;
 	default:
-		if (task_dma_ok(task) == 0 || drive->using_dma == 0 ||
-		    dma_ops->dma_setup(drive))
+		if (drive->using_dma == 0 || dma_ops->dma_setup(drive))
 			return ide_stopped;
 		dma_ops->dma_exec_cmd(drive, tf->command);
 		dma_ops->dma_start(drive);
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 01/14] cmd640: fix warm-plug support for the secondar..., Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:50 pm)
[PATCH 14/14] ide: remove needless includes from setup-pci.c, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:53 pm)
[PATCH 13/14] ide: remove needless includes from ide-taskfil..., Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:52 pm)
[PATCH 12/14] ide: remove needless includes from ide.c, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:52 pm)
[PATCH 11/14] ide: remove superfluous BUG_ON() from set_geom..., Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:52 pm)
[PATCH 10/14] ide: allow any command requesting DMA data pha..., Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:52 pm)
[PATCH 09/14] ide-pnp: print driver banner message early, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:52 pm)
[PATCH 08/14] ide-h8300: print driver banner message early, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:52 pm)
[PATCH 07/14] ide: print message on error in ide_find_port_s..., Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:51 pm)
[PATCH 06/14] ide_platform: use struct ide_port_info, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:51 pm)
[PATCH 03/14] cmd640: add -&gt;init_dev method, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:51 pm)
[PATCH 05/14] ide-h8300: use struct ide_port_info, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:51 pm)
[PATCH 02/14] ide: -&gt;port_init_devs -&gt; -&gt;init_dev, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:51 pm)
[PATCH 04/14] rapide: use struct ide_port_info, Bartlomiej Zolnierkiewicz..., (Tue Jun 10, 4:51 pm)