aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/st.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index c60972ffcfc3..2cfa17a2eacb 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -2515,13 +2515,16 @@ static int do_load_unload(struct scsi_tape *STp, struct file *filp, int load_cod
2515 printk(ST_DEB_MSG "%s: Loading tape.\n", name); 2515 printk(ST_DEB_MSG "%s: Loading tape.\n", name);
2516 ); 2516 );
2517 2517
2518 SRpnt = st_do_scsi(NULL, STp, cmd, 0, DMA_NONE, 2518 SRpnt = st_allocate_request(STp);
2519 timeout, MAX_RETRIES, 1);
2520 if (!SRpnt) 2519 if (!SRpnt)
2521 return (STp->buffer)->syscall_result; 2520 return STp->buffer->syscall_result;
2521
2522 retval = st_scsi_kern_execute(SRpnt, cmd, DMA_NONE, NULL, 0, timeout,
2523 MAX_RETRIES);
2524 if (retval)
2525 goto out;
2522 2526
2523 retval = (STp->buffer)->syscall_result; 2527 retval = (STp->buffer)->syscall_result;
2524 st_release_request(SRpnt);
2525 2528
2526 if (!retval) { /* SCSI command successful */ 2529 if (!retval) { /* SCSI command successful */
2527 2530
@@ -2540,6 +2543,8 @@ static int do_load_unload(struct scsi_tape *STp, struct file *filp, int load_cod
2540 STps = &(STp->ps[STp->partition]); 2543 STps = &(STp->ps[STp->partition]);
2541 STps->drv_file = STps->drv_block = (-1); 2544 STps->drv_file = STps->drv_block = (-1);
2542 } 2545 }
2546out:
2547 st_release_request(SRpnt);
2543 2548
2544 return retval; 2549 return retval;
2545} 2550}