aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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