aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-12-15 18:35:24 -0500
committerJames Bottomley <jejb@titanic.(none)>2005-12-15 18:35:24 -0500
commit2a1e1379bae53f647c463a677cc2ec71b591c348 (patch)
treea152beb5e8679e94430c5b47bf798dd8a2d4fd5d /drivers/scsi/st.c
parent787926b1b2d21d42ca462dc736b77f1a4a30c503 (diff)
parent7b6666530e2736f190a2629c8abe34275054449f (diff)
Merge by hand (conflicts in scsi_lib.c)
This merge is pretty extensive. The conflict is over the new req->retries parameter, so I had to change the prototype to scsi_setup_blk_pc_cmnd() and the usage in sd, sr and st. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c19
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 */
4196static int st_init_command(struct scsi_cmnd *SCpnt) 4196static 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}