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/sd.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/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d82795455efb..9d893f085015 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -245,24 +245,10 @@ static int sd_init_command(struct scsi_cmnd * SCpnt) | |||
245 | * SG_IO from block layer already setup, just copy cdb basically | 245 | * SG_IO from block layer already setup, just copy cdb basically |
246 | */ | 246 | */ |
247 | if (blk_pc_request(rq)) { | 247 | if (blk_pc_request(rq)) { |
248 | if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) | 248 | scsi_setup_blk_pc_cmnd(SCpnt, SD_PASSTHROUGH_RETRIES); |
249 | return 0; | ||
250 | |||
251 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | ||
252 | SCpnt->cmd_len = rq->cmd_len; | ||
253 | if (rq_data_dir(rq) == WRITE) | ||
254 | SCpnt->sc_data_direction = DMA_TO_DEVICE; | ||
255 | else if (rq->data_len) | ||
256 | SCpnt->sc_data_direction = DMA_FROM_DEVICE; | ||
257 | else | ||
258 | SCpnt->sc_data_direction = DMA_NONE; | ||
259 | |||
260 | this_count = rq->data_len; | ||
261 | if (rq->timeout) | 249 | if (rq->timeout) |
262 | timeout = rq->timeout; | 250 | timeout = rq->timeout; |
263 | 251 | ||
264 | SCpnt->transfersize = rq->data_len; | ||
265 | SCpnt->allowed = SD_PASSTHROUGH_RETRIES; | ||
266 | goto queue; | 252 | goto queue; |
267 | } | 253 | } |
268 | 254 | ||