Skip to content

Commit

Permalink
[SCSI] st: convert st_int_ioctl to use st_scsi_kern_execute
Browse files Browse the repository at this point in the history
This replaces st_do_scsi in st_int_ioctl 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 7a31ec3 commit ccc607f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -2852,12 +2852,15 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
return (-ENOSYS);
}

SRpnt = st_do_scsi(NULL, STp, cmd, datalen, direction,
timeout, MAX_RETRIES, 1);
SRpnt = st_allocate_request(STp);
if (!SRpnt)
return (STp->buffer)->syscall_result;

ioctl_result = (STp->buffer)->syscall_result;
ioctl_result = st_scsi_kern_execute(SRpnt, cmd, direction,
STp->buffer->b_data, datalen,
timeout, MAX_RETRIES);
if (!ioctl_result)
ioctl_result = (STp->buffer)->syscall_result;

if (!ioctl_result) { /* SCSI command successful */
st_release_request(SRpnt);
Expand Down

0 comments on commit ccc607f

Please sign in to comment.