diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 11:00:06 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-03 11:00:06 -0500 |
commit | 61420e147a706ee7c7a902008045547fb2a2a330 (patch) | |
tree | c5739fe1feac05cac49c96107138520c65f8f657 /drivers/scsi/st.c | |
parent | 3d0a59c02303df01848537b3bf938dc11e9a0ded (diff) | |
parent | a18ceba7b40e24a9da87249bd74f16ea5abd6894 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 7ac6ea141ff..dd592f6a252 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -4194,27 +4194,10 @@ static void st_intr(struct scsi_cmnd *SCpnt) */ static int st_init_command(struct scsi_cmnd *SCpnt) { - struct request *rq; - if (!(SCpnt->request->flags & REQ_BLOCK_PC)) return 0; - rq = SCpnt->request; - if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) - return 0; - - memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); - SCpnt->cmd_len = rq->cmd_len; - - if (rq_data_dir(rq) == WRITE) - SCpnt->sc_data_direction = DMA_TO_DEVICE; - else if (rq->data_len) - SCpnt->sc_data_direction = DMA_FROM_DEVICE; - else - SCpnt->sc_data_direction = DMA_NONE; - - SCpnt->timeout_per_command = rq->timeout; - SCpnt->transfersize = rq->data_len; + scsi_setup_blk_pc_cmnd(SCpnt, 0); SCpnt->done = st_intr; return 1; } |