diff options
-rw-r--r-- | drivers/scsi/scsi_lib.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sr.c | 1 | ||||
-rw-r--r-- | drivers/scsi/st.c | 1 |
4 files changed, 4 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) |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index de564b386052..9a1dc0cea03c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -235,6 +235,7 @@ static int sd_init_command(struct scsi_cmnd * SCpnt) | |||
235 | return 0; | 235 | return 0; |
236 | 236 | ||
237 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | 237 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); |
238 | SCpnt->cmd_len = rq->cmd_len; | ||
238 | if (rq_data_dir(rq) == WRITE) | 239 | if (rq_data_dir(rq) == WRITE) |
239 | SCpnt->sc_data_direction = DMA_TO_DEVICE; | 240 | SCpnt->sc_data_direction = DMA_TO_DEVICE; |
240 | else if (rq->data_len) | 241 | else if (rq->data_len) |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index ce63fc8312dc..561901b1cf11 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -326,6 +326,7 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) | |||
326 | return 0; | 326 | return 0; |
327 | 327 | ||
328 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | 328 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); |
329 | SCpnt->cmd_len = rq->cmd_len; | ||
329 | if (!rq->data_len) | 330 | if (!rq->data_len) |
330 | SCpnt->sc_data_direction = DMA_NONE; | 331 | SCpnt->sc_data_direction = DMA_NONE; |
331 | else if (rq_data_dir(rq) == WRITE) | 332 | else if (rq_data_dir(rq) == WRITE) |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index a93308ae9736..d001c046551b 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -4206,6 +4206,7 @@ static int st_init_command(struct scsi_cmnd *SCpnt) | |||
4206 | return 0; | 4206 | return 0; |
4207 | 4207 | ||
4208 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); | 4208 | memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); |
4209 | SCpnt->cmd_len = rq->cmd_len; | ||
4209 | 4210 | ||
4210 | if (rq_data_dir(rq) == WRITE) | 4211 | if (rq_data_dir(rq) == WRITE) |
4211 | SCpnt->sc_data_direction = DMA_TO_DEVICE; | 4212 | SCpnt->sc_data_direction = DMA_TO_DEVICE; |