diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-05 01:25:25 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:30 -0500 |
commit | 39ade4b1acb685127d73b53814850d9c92084c9e (patch) | |
tree | 6ee9598af63a7722f8ff1943e4c30539456c120a | |
parent | 15c920a6dc65ea0117bc5d4fd025d4b2eab13d59 (diff) |
[SCSI] st: convert cross_eof to use st_scsi_kern_execute
This replaces st_do_scsi in cross_eof (SPACE) with
st_scsi_kern_execute.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Kai Makisara <Kai.Makisara@kolumbus.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/scsi/st.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 2cfa17a2eacb..34630a611f61 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -627,6 +627,7 @@ static int cross_eof(struct scsi_tape * STp, int forward) | |||
627 | { | 627 | { |
628 | struct st_request *SRpnt; | 628 | struct st_request *SRpnt; |
629 | unsigned char cmd[MAX_COMMAND_SIZE]; | 629 | unsigned char cmd[MAX_COMMAND_SIZE]; |
630 | int ret; | ||
630 | 631 | ||
631 | cmd[0] = SPACE; | 632 | cmd[0] = SPACE; |
632 | cmd[1] = 0x01; /* Space FileMarks */ | 633 | cmd[1] = 0x01; /* Space FileMarks */ |
@@ -640,20 +641,26 @@ static int cross_eof(struct scsi_tape * STp, int forward) | |||
640 | DEBC(printk(ST_DEB_MSG "%s: Stepping over filemark %s.\n", | 641 | DEBC(printk(ST_DEB_MSG "%s: Stepping over filemark %s.\n", |
641 | tape_name(STp), forward ? "forward" : "backward")); | 642 | tape_name(STp), forward ? "forward" : "backward")); |
642 | 643 | ||
643 | SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, | 644 | SRpnt = st_allocate_request(STp); |
644 | STp->device->request_queue->rq_timeout, | ||
645 | MAX_RETRIES, 1); | ||
646 | if (!SRpnt) | 645 | if (!SRpnt) |
647 | return (STp->buffer)->syscall_result; | 646 | return STp->buffer->syscall_result; |
648 | 647 | ||
649 | st_release_request(SRpnt); | 648 | ret = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0, |
650 | SRpnt = NULL; | 649 | STp->device->request_queue->rq_timeout, |
650 | MAX_RETRIES); | ||
651 | if (ret) | ||
652 | goto out; | ||
653 | |||
654 | ret = STp->buffer->syscall_result; | ||
651 | 655 | ||
652 | if ((STp->buffer)->cmdstat.midlevel_result != 0) | 656 | if ((STp->buffer)->cmdstat.midlevel_result != 0) |
653 | printk(KERN_ERR "%s: Stepping over filemark %s failed.\n", | 657 | printk(KERN_ERR "%s: Stepping over filemark %s failed.\n", |
654 | tape_name(STp), forward ? "forward" : "backward"); | 658 | tape_name(STp), forward ? "forward" : "backward"); |
655 | 659 | ||
656 | return (STp->buffer)->syscall_result; | 660 | out: |
661 | st_release_request(SRpnt); | ||
662 | |||
663 | return ret; | ||
657 | } | 664 | } |
658 | 665 | ||
659 | 666 | ||