aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-05 01:25:23 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:29 -0500
commit3c0bf16c63a6ef69c9b3e90591e6179deacfa8f7 (patch)
tree7e0fc5b2ca3a79995dc0d10ce6d9143cc0cf67e6
parent0944a721ba5c2535b615f06afd3aaa2f18c69cb9 (diff)
[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>
-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
3088 timeout = STp->device->request_queue->rq_timeout; 3088 timeout = STp->device->request_queue->rq_timeout;
3089 } 3089 }
3090 3090
3091 SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE, 3091 SRpnt = st_allocate_request(STp);
3092 timeout, MAX_READY_RETRIES, 1);
3093 if (!SRpnt) 3092 if (!SRpnt)
3094 return (STp->buffer)->syscall_result; 3093 return STp->buffer->syscall_result;
3094
3095 result = st_scsi_kern_execute(SRpnt, scmd, DMA_NONE, NULL, 0,
3096 timeout, MAX_READY_RETRIES);
3097 if (result)
3098 goto out;
3095 3099
3096 STps->drv_block = STps->drv_file = (-1); 3100 STps->drv_block = STps->drv_file = (-1);
3097 STps->eof = ST_NOEOF; 3101 STps->eof = ST_NOEOF;
@@ -3116,7 +3120,7 @@ static int set_location(struct scsi_tape *STp, unsigned int block, int partition
3116 STps->drv_block = STps->drv_file = 0; 3120 STps->drv_block = STps->drv_file = 0;
3117 result = 0; 3121 result = 0;
3118 } 3122 }
3119 3123out:
3120 st_release_request(SRpnt); 3124 st_release_request(SRpnt);
3121 SRpnt = NULL; 3125 SRpnt = NULL;
3122 3126