linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 10/14] ide: allow any command requesting DMA data phase for HDIO_DRIVE_TASKFILE
Date: Tue, 10 Jun 2008 22:52:30 +0200	[thread overview]
Message-ID: <20080610205230.18469.16053.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080610205059.18469.44856.sendpatchset@localhost.localdomain>

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);

  parent reply	other threads:[~2008-06-10 20:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 20:50 [PATCH 01/14] cmd640: fix warm-plug support for the secondary interface Bartlomiej Zolnierkiewicz
2008-06-10 20:51 ` [PATCH 02/14] ide: ->port_init_devs -> ->init_dev Bartlomiej Zolnierkiewicz
2008-06-10 20:51 ` [PATCH 03/14] cmd640: add ->init_dev method Bartlomiej Zolnierkiewicz
2008-06-10 20:51 ` [PATCH 04/14] rapide: use struct ide_port_info Bartlomiej Zolnierkiewicz
2008-06-10 20:51 ` [PATCH 05/14] ide-h8300: " Bartlomiej Zolnierkiewicz
2008-06-10 20:51 ` [PATCH 06/14] ide_platform: " Bartlomiej Zolnierkiewicz
2008-06-10 20:51 ` [PATCH 07/14] ide: print message on error in ide_find_port_slot() Bartlomiej Zolnierkiewicz
2008-06-10 20:52 ` [PATCH 08/14] ide-h8300: print driver banner message early Bartlomiej Zolnierkiewicz
2008-06-10 20:52 ` [PATCH 09/14] ide-pnp: " Bartlomiej Zolnierkiewicz
2008-06-10 20:52 ` Bartlomiej Zolnierkiewicz [this message]
2008-06-10 20:52 ` [PATCH 11/14] ide: remove superfluous BUG_ON() from set_geometry_intr() Bartlomiej Zolnierkiewicz
2008-06-10 20:52 ` [PATCH 12/14] ide: remove needless includes from ide.c Bartlomiej Zolnierkiewicz
2008-06-10 20:52 ` [PATCH 13/14] ide: remove needless includes from ide-taskfile.c Bartlomiej Zolnierkiewicz
2008-06-10 20:53 ` [PATCH 14/14] ide: remove needless includes from setup-pci.c Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080610205230.18469.16053.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).