Skip to content

Commit

Permalink
[SCSI] st: convert set_location to use st_scsi_kern_execute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Dec 29, 2008
1 parent 0944a72 commit 3c0bf16
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 3c0bf16

Please sign in to comment.