aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-tape.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 7f56f2003342..83014abf330f 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -689,13 +689,6 @@ static void idetape_create_request_sense_cmd(struct ide_atapi_pc *pc)
689 pc->req_xfer = 20; 689 pc->req_xfer = 20;
690} 690}
691 691
692static void idetape_init_rq(struct request *rq, u8 cmd)
693{
694 blk_rq_init(NULL, rq);
695 rq->cmd_type = REQ_TYPE_SPECIAL;
696 rq->cmd[13] = cmd;
697}
698
699/* 692/*
700 * Generate a new packet command request in front of the request queue, before 693 * Generate a new packet command request in front of the request queue, before
701 * the current request, so that it will be processed immediately, on the next 694 * the current request, so that it will be processed immediately, on the next
@@ -716,11 +709,13 @@ static void idetape_queue_pc_head(ide_drive_t *drive, struct ide_atapi_pc *pc,
716{ 709{
717 struct ide_tape_obj *tape = drive->driver_data; 710 struct ide_tape_obj *tape = drive->driver_data;
718 711
719 idetape_init_rq(rq, REQ_IDETAPE_PC1); 712 blk_rq_init(NULL, rq);
713 rq->cmd_type = REQ_TYPE_SPECIAL;
720 rq->cmd_flags |= REQ_PREEMPT; 714 rq->cmd_flags |= REQ_PREEMPT;
721 rq->buffer = (char *) pc; 715 rq->buffer = (char *) pc;
722 rq->rq_disk = tape->disk; 716 rq->rq_disk = tape->disk;
723 memcpy(rq->cmd, pc->c, 12); 717 memcpy(rq->cmd, pc->c, 12);
718 rq->cmd[13] = REQ_IDETAPE_PC1;
724 ide_do_drive_cmd(drive, rq); 719 ide_do_drive_cmd(drive, rq);
725} 720}
726 721