diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-12-16 00:35:24 +0100 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-12-16 00:35:24 +0100 |
commit | 2a1e1379bae53f647c463a677cc2ec71b591c348 (patch) | |
tree | a152beb5e8679e94430c5b47bf798dd8a2d4fd5d /drivers/scsi/sr.c | |
parent | [SCSI] Fix st oops with new scsi_execute infrastructure (diff) | |
parent | [PATCH] Au1550 AC'97 OSS driver spinlock fixes (diff) | |
download | linux-2a1e1379bae53f647c463a677cc2ec71b591c348.tar.xz linux-2a1e1379bae53f647c463a677cc2ec71b591c348.zip |
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) * these are already setup, just copy cdb basically */ if (SCpnt->request->flags & REQ_BLOCK_PC) { - struct request *rq = SCpnt->request; + scsi_setup_blk_pc_cmnd(SCpnt, MAX_RETRIES); - 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_len) - SCpnt->sc_data_direction = DMA_NONE; - else if (rq_data_dir(rq) == WRITE) - SCpnt->sc_data_direction = DMA_TO_DEVICE; - else - SCpnt->sc_data_direction = DMA_FROM_DEVICE; - - this_count = rq->data_len; - if (rq->timeout) - timeout = rq->timeout; + if (SCpnt->timeout_per_command) + timeout = SCpnt->timeout_per_command; - SCpnt->transfersize = rq->data_len; goto queue; } |