diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-12-15 18:35:24 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-12-15 18:35:24 -0500 |
commit | 2a1e1379bae53f647c463a677cc2ec71b591c348 (patch) | |
tree | a152beb5e8679e94430c5b47bf798dd8a2d4fd5d /drivers/scsi/sr.c | |
parent | 787926b1b2d21d42ca462dc736b77f1a4a30c503 (diff) | |
parent | 7b6666530e2736f190a2629c8abe34275054449f (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/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index a3fa64cf6650..7e7398d563cc 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -320,25 +320,11 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) | |||
320 | * these are already setup, just copy cdb basically | 320 | * these are already setup, just copy cdb basically |
321 | */ | 321 | */ |
322 | if (SCpnt->request->flags & REQ_BLOCK_PC) { | 322 | if (SCpnt->request->flags & REQ_BLOCK_PC) { |
323 | struct request *rq = SCpnt->request; | 323 | scsi_setup_blk_pc_cmnd(SCpnt, MAX_RETRIES); |
324 | 324 | ||
325 | if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) | 325 | if (SCpnt->timeout_per_command) |
326 | return 0; | 326 | timeout = SCpnt->timeout_per_command; |
327 | |||
328 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | ||
329 | SCpnt->cmd_len = rq->cmd_len; | ||
330 | if (!rq->data_len) | ||
331 | SCpnt->sc_data_direction = DMA_NONE; | ||
332 | else if (rq_data_dir(rq) == WRITE) | ||
333 | SCpnt->sc_data_direction = DMA_TO_DEVICE; | ||
334 | else | ||
335 | SCpnt->sc_data_direction = DMA_FROM_DEVICE; | ||
336 | |||
337 | this_count = rq->data_len; | ||
338 | if (rq->timeout) | ||
339 | timeout = rq->timeout; | ||
340 | 327 | ||
341 | SCpnt->transfersize = rq->data_len; | ||
342 | goto queue; | 328 | goto queue; |
343 | } | 329 | } |
344 | 330 | ||