diff options
-rw-r--r-- | drivers/scsi/st.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 23780e99ca98..7f3f317ee6ca 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -2852,12 +2852,15 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon | |||
2852 | return (-ENOSYS); | 2852 | return (-ENOSYS); |
2853 | } | 2853 | } |
2854 | 2854 | ||
2855 | SRpnt = st_do_scsi(NULL, STp, cmd, datalen, direction, | 2855 | SRpnt = st_allocate_request(STp); |
2856 | timeout, MAX_RETRIES, 1); | ||
2857 | if (!SRpnt) | 2856 | if (!SRpnt) |
2858 | return (STp->buffer)->syscall_result; | 2857 | return (STp->buffer)->syscall_result; |
2859 | 2858 | ||
2860 | ioctl_result = (STp->buffer)->syscall_result; | 2859 | ioctl_result = st_scsi_kern_execute(SRpnt, cmd, direction, |
2860 | STp->buffer->b_data, datalen, | ||
2861 | timeout, MAX_RETRIES); | ||
2862 | if (!ioctl_result) | ||
2863 | ioctl_result = (STp->buffer)->syscall_result; | ||
2861 | 2864 | ||
2862 | if (!ioctl_result) { /* SCSI command successful */ | 2865 | if (!ioctl_result) { /* SCSI command successful */ |
2863 | st_release_request(SRpnt); | 2866 | st_release_request(SRpnt); |