diff options
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 2096d137f5ee..894ad53be04b 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4195,27 +4195,10 @@ static void st_intr(struct scsi_cmnd *SCpnt) | |||
4195 | */ | 4195 | */ |
4196 | static int st_init_command(struct scsi_cmnd *SCpnt) | 4196 | static int st_init_command(struct scsi_cmnd *SCpnt) |
4197 | { | 4197 | { |
4198 | struct request *rq; | ||
4199 | |||
4200 | if (!(SCpnt->request->flags & REQ_BLOCK_PC)) | 4198 | if (!(SCpnt->request->flags & REQ_BLOCK_PC)) |
4201 | return 0; | 4199 | return 0; |
4202 | 4200 | ||
4203 | rq = SCpnt->request; | 4201 | scsi_setup_blk_pc_cmnd(SCpnt, 0); |
4204 | if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) | ||
4205 | return 0; | ||
4206 | |||
4207 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | ||
4208 | SCpnt->cmd_len = rq->cmd_len; | ||
4209 | |||
4210 | if (rq_data_dir(rq) == WRITE) | ||
4211 | SCpnt->sc_data_direction = DMA_TO_DEVICE; | ||
4212 | else if (rq->data_len) | ||
4213 | SCpnt->sc_data_direction = DMA_FROM_DEVICE; | ||
4214 | else | ||
4215 | SCpnt->sc_data_direction = DMA_NONE; | ||
4216 | |||
4217 | SCpnt->timeout_per_command = rq->timeout; | ||
4218 | SCpnt->transfersize = rq->data_len; | ||
4219 | SCpnt->done = st_intr; | 4202 | SCpnt->done = st_intr; |
4220 | return 1; | 4203 | return 1; |
4221 | } | 4204 | } |