diff options
author | Timothy Thelin <Timothy.Thelin@wdc.com> | 2005-09-13 22:56:28 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-14 16:54:12 -0400 |
commit | 186d330e682210100c671355580a8592e4a21692 (patch) | |
tree | 63c9956263463c950c2965a5e871508d41aa9de3 /drivers/scsi/scsi_lib.c | |
parent | a89f29f6ea8dba0b7c4ae5d1d0b43de6cb500ea6 (diff) |
[SCSI] scsi: sd, sr, st, and scsi_lib all fail to copy cmd_len to new cmd
This fixes an issue in scsi command initialization from a request
where sd, sr, st, and scsi_lib all fail to copy the request's
cmd_len to the scsi command's cmd_len field.
Signed-off-by: Timothy Thelin <timothy.thelin@wdc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 863bb6495daa..f9026d08532a 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1268,6 +1268,7 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) | |||
1268 | } | 1268 | } |
1269 | } else { | 1269 | } else { |
1270 | memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd)); | 1270 | memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd)); |
1271 | cmd->cmd_len = req->cmd_len; | ||
1271 | if (rq_data_dir(req) == WRITE) | 1272 | if (rq_data_dir(req) == WRITE) |
1272 | cmd->sc_data_direction = DMA_TO_DEVICE; | 1273 | cmd->sc_data_direction = DMA_TO_DEVICE; |
1273 | else if (req->data_len) | 1274 | else if (req->data_len) |