diff options
| author | Steve French <sfrench@us.ibm.com> | 2005-12-31 13:27:22 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2005-12-31 13:27:22 -0500 |
| commit | eea60caef610c7a6c58c0de9c80ae1e438e01301 (patch) | |
| tree | 25e19289bba003fe085e589430d0d981fd6b73a7 /drivers/scsi/st.c | |
| parent | da8543ef125afc7bba4da526b61a1ae07dc25109 (diff) | |
| parent | 82c9df820112c6286a8e8fbe482e94b65b49062c (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
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 7ac6ea141fff..dd592f6a2529 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
| @@ -4194,27 +4194,10 @@ static void st_intr(struct scsi_cmnd *SCpnt) | |||
| 4194 | */ | 4194 | */ |
| 4195 | static int st_init_command(struct scsi_cmnd *SCpnt) | 4195 | static int st_init_command(struct scsi_cmnd *SCpnt) |
| 4196 | { | 4196 | { |
| 4197 | struct request *rq; | ||
| 4198 | |||
| 4199 | if (!(SCpnt->request->flags & REQ_BLOCK_PC)) | 4197 | if (!(SCpnt->request->flags & REQ_BLOCK_PC)) |
| 4200 | return 0; | 4198 | return 0; |
| 4201 | 4199 | ||
| 4202 | rq = SCpnt->request; | 4200 | scsi_setup_blk_pc_cmnd(SCpnt, 0); |
| 4203 | if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) | ||
| 4204 | return 0; | ||
| 4205 | |||
| 4206 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | ||
| 4207 | SCpnt->cmd_len = rq->cmd_len; | ||
| 4208 | |||
| 4209 | if (rq_data_dir(rq) == WRITE) | ||
| 4210 | SCpnt->sc_data_direction = DMA_TO_DEVICE; | ||
| 4211 | else if (rq->data_len) | ||
| 4212 | SCpnt->sc_data_direction = DMA_FROM_DEVICE; | ||
| 4213 | else | ||
| 4214 | SCpnt->sc_data_direction = DMA_NONE; | ||
| 4215 | |||
| 4216 | SCpnt->timeout_per_command = rq->timeout; | ||
| 4217 | SCpnt->transfersize = rq->data_len; | ||
| 4218 | SCpnt->done = st_intr; | 4201 | SCpnt->done = st_intr; |
| 4219 | return 1; | 4202 | return 1; |
| 4220 | } | 4203 | } |
