summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-08 16:45:36 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-08 16:45:36 +0200
commitcf90bfe2ebaf9d32f37acbebb7425c280fd6cd30 (patch)
treed3e3f2067dc423721d698d154e15213aa5b0132d /drivers/ide/ide-taskfile.c
parentMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/... (diff)
parentide: Fix IDE taskfile with cfq scheduler (diff)
downloadlinux-cf90bfe2ebaf9d32f37acbebb7425c280fd6cd30.tar.xz
linux-cf90bfe2ebaf9d32f37acbebb7425c280fd6cd30.zip
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 cc8633cbe133..67fb73559fd5 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,