summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:11 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 20:13:11 +0100
commit145b75e9aedbe36c55e45da8564dcd0814bdd89e (patch)
tree2bf27bb6657b28d12404de416276bca1c2ba52a4 /drivers/ide/ide-taskfile.c
parentide: use wait_drive_not_busy() in drive_cmd_intr() (take 2) (diff)
downloadlinux-145b75e9aedbe36c55e45da8564dcd0814bdd89e.tar.xz
linux-145b75e9aedbe36c55e45da8564dcd0814bdd89e.zip
ide: initialize rq->cmd_type in ide_init_drive_cmd() callers
* Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and set_pio_mode() (other callers were aleady over-riding rq->cmd_type). * Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index b559bece6e73..b8c7e8134d88 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -759,6 +759,7 @@ int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors,
buf = buffer;
memset(buf, 0, 4 + SECTOR_WORDS * 4 * sectors);
ide_init_drive_cmd(&rq);
+ rq.cmd_type = REQ_TYPE_ATA_CMD;
rq.buffer = buf;
*buf++ = cmd;
*buf++ = nsect;
@@ -778,7 +779,10 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
if (NULL == (void *) arg) {
struct request rq;
+
ide_init_drive_cmd(&rq);
+ rq.cmd_type = REQ_TYPE_ATA_CMD;
+
return ide_do_drive_cmd(drive, &rq, ide_wait);
}