diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-12-05 15:25:24 +0900 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 11:24:29 -0600 |
commit | 15c920a6dc65ea0117bc5d4fd025d4b2eab13d59 (patch) | |
tree | 73e441083167d177f0ed6fe0d027056938b6f003 /drivers | |
parent | 3c0bf16c63a6ef69c9b3e90591e6179deacfa8f7 (diff) | |
download | op-kernel-dev-15c920a6dc65ea0117bc5d4fd025d4b2eab13d59.zip op-kernel-dev-15c920a6dc65ea0117bc5d4fd025d4b2eab13d59.tar.gz |
[SCSI] st: convert do_load_unload to use st_scsi_kern_execute
This replaces st_do_scsi in do_load_unload (START STOP) 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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/st.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index c60972f..2cfa17a 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -2515,13 +2515,16 @@ static int do_load_unload(struct scsi_tape *STp, struct file *filp, int load_cod printk(ST_DEB_MSG "%s: Loading tape.\n", name); ); - SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, - timeout, MAX_RETRIES, 1); + SRpnt = st_allocate_request(STp); if (!SRpnt) - return (STp->buffer)->syscall_result; + return STp->buffer->syscall_result; + + retval = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0, timeout, + MAX_RETRIES); + if (retval) + goto out; retval = (STp->buffer)->syscall_result; - st_release_request(SRpnt); if (!retval) { /* SCSI command successful */ @@ -2540,6 +2543,8 @@ static int do_load_unload(struct scsi_tape *STp, struct file *filp, int load_cod STps = &(STp->ps[STp->partition]); STps->drv_file = STps->drv_block = (-1); } +out: + st_release_request(SRpnt); return retval; } |