summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-05 07:25:23 +0100
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 18:24:29 +0100
commit3c0bf16c63a6ef69c9b3e90591e6179deacfa8f7 (patch)
tree7e0fc5b2ca3a79995dc0d10ce6d9143cc0cf67e6 /drivers/scsi/st.c
parent[SCSI] st: convert test_ready to use st_scsi_kern_execute (diff)
downloadlinux-3c0bf16c63a6ef69c9b3e90591e6179deacfa8f7.tar.xz
linux-3c0bf16c63a6ef69c9b3e90591e6179deacfa8f7.zip
[SCSI] st: convert set_location to use st_scsi_kern_execute
This replaces st_do_scsi in set_location (LOCATE 10) 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 '')
-rw-r--r--drivers/scsi/st.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index c200496e90fe..c60972ffcfc3 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3088,10 +3088,14 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition
timeout = STp->device->request_queue->rq_timeout;
}
- SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE,
- timeout, MAX_READY_RETRIES, 1);
+ SRpnt = st_allocate_request(STp);
if (!SRpnt)
- return (STp->buffer)->syscall_result;
+ return STp->buffer->syscall_result;
+
+ result = st_scsi_kern_execute(SRpnt, scmd, DMA_NONE, NULL, 0,
+ timeout, MAX_READY_RETRIES);
+ if (result)
+ goto out;
STps->drv_block = STps->drv_file = (-1);
STps->eof = ST_NOEOF;
@@ -3116,7 +3120,7 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition
STps->drv_block = STps->drv_file = 0;
result = 0;
}
-
+out:
st_release_request(SRpnt);
SRpnt = NULL;