aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-05 01:25:24 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:29 -0500
commit15c920a6dc65ea0117bc5d4fd025d4b2eab13d59 (patch)
tree73e441083167d177f0ed6fe0d027056938b6f003 /drivers
parent3c0bf16c63a6ef69c9b3e90591e6179deacfa8f7 (diff)
[SCSI] st: convert do_load_unload to use st_scsi_kern_execute
This replaces st_do_scsi in do_load_unload (START STOP) 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')
-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}