aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-08 07:45:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-08 07:45:36 -0700
commitcf90bfe2ebaf9d32f37acbebb7425c280fd6cd30 (patch)
treed3e3f2067dc423721d698d154e15213aa5b0132d /drivers/ide/ide-taskfile.c
parent0a2851b9a837cb025d48bb8118f35ebd12bce4b5 (diff)
parent720fc22a7af79d91ec460c80efa92c65c12d105e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: ide: Fix IDE taskfile with cfq scheduler ide: Must hold queue lock when requeueing ide: Requeue request after DMA timeout
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index cc8633cbe13..67fb73559fd 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -428,13 +428,11 @@ int ide_raw_taskfile(ide_drive_t *drive, struct ide_cmd *cmd, u8 *buf,
{
struct request *rq;
int error;
+ int rw = !(cmd->tf_flags & IDE_TFLAG_WRITE) ? READ : WRITE;
- rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
+ rq = blk_get_request(drive->queue, rw, __GFP_WAIT);
rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
- if (cmd->tf_flags & IDE_TFLAG_WRITE)
- rq->cmd_flags |= REQ_RW;
-
/*
* (ks) We transfer currently only whole sectors.
* This is suffient for now. But, it would be great,