* 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>
void ide_init_drive_cmd (struct request *rq)
{
memset(rq, 0, sizeof(*rq));
- rq->cmd_type = REQ_TYPE_ATA_CMD;
rq->ref_count = 1;
}
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;
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);
}
if (drive->special.b.set_tune)
return -EBUSY;
+
ide_init_drive_cmd(&rq);
+ rq.cmd_type = REQ_TYPE_ATA_CMD;
+
drive->tune_req = (u8) arg;
drive->special.b.set_tune = 1;
(void) ide_do_drive_cmd(drive, &rq, ide_wait);