diff options
-rw-r--r-- | drivers/scsi/st.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 09d06bdd25dd..23780e99ca98 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -3019,11 +3019,17 @@ static int get_location(struct scsi_tape *STp, unsigned int *block, int *partiti | |||
3019 | if (!logical && !STp->scsi2_logical) | 3019 | if (!logical && !STp->scsi2_logical) |
3020 | scmd[1] = 1; | 3020 | scmd[1] = 1; |
3021 | } | 3021 | } |
3022 | SRpnt = st_do_scsi(NULL, STp, scmd, 20, DMA_FROM_DEVICE, | 3022 | |
3023 | STp->device->request_queue->rq_timeout, | 3023 | SRpnt = st_allocate_request(STp); |
3024 | MAX_READY_RETRIES, 1); | ||
3025 | if (!SRpnt) | 3024 | if (!SRpnt) |
3026 | return (STp->buffer)->syscall_result; | 3025 | return STp->buffer->syscall_result; |
3026 | |||
3027 | result = st_scsi_kern_execute(SRpnt, scmd, DMA_FROM_DEVICE, | ||
3028 | STp->buffer->b_data, 20, | ||
3029 | STp->device->request_queue->rq_timeout, | ||
3030 | MAX_READY_RETRIES); | ||
3031 | if (result) | ||
3032 | goto out; | ||
3027 | 3033 | ||
3028 | if ((STp->buffer)->syscall_result != 0 || | 3034 | if ((STp->buffer)->syscall_result != 0 || |
3029 | (STp->device->scsi_level >= SCSI_2 && | 3035 | (STp->device->scsi_level >= SCSI_2 && |
@@ -3051,6 +3057,7 @@ static int get_location(struct scsi_tape *STp, unsigned int *block, int *partiti | |||
3051 | DEBC(printk(ST_DEB_MSG "%s: Got tape pos. blk %d part %d.\n", name, | 3057 | DEBC(printk(ST_DEB_MSG "%s: Got tape pos. blk %d part %d.\n", name, |
3052 | *block, *partition)); | 3058 | *block, *partition)); |
3053 | } | 3059 | } |
3060 | out: | ||
3054 | st_release_request(SRpnt); | 3061 | st_release_request(SRpnt); |
3055 | SRpnt = NULL; | 3062 | SRpnt = NULL; |
3056 | 3063 | ||