aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-05 01:25:30 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:31 -0500
commit7a31ec3c1ff1ceeb3aebe25e13def5ac4edd5dc4 (patch)
tree7757b9481d35b996141d2577fafc8ab3f2c45700 /drivers/scsi/st.c
parent18c87015741d931875038789957db55b00661f5b (diff)
[SCSI] st: convert get_location to use st_scsi_kern_execute
This replaces st_do_scsi in get_location (READ_POSITION) 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/scsi/st.c')
-rw-r--r--drivers/scsi/st.c15
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 }
3060out:
3054 st_release_request(SRpnt); 3061 st_release_request(SRpnt);
3055 SRpnt = NULL; 3062 SRpnt = NULL;
3056 3063