aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-11-22 13:06:44 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-11-22 13:06:44 -0500
commit0bd2af46839ad6262d25714a6ec0365db9d6b98f (patch)
treedcced72d230d69fd0c5816ac6dd03ab84799a93e /drivers/scsi/scsi_lib.c
parente138a5d2356729b8752e88520cc1525fae9794ac (diff)
parentf26b90440cd74c78fe10c9bd5160809704a9627c (diff)
Merge ../scsi-rc-fixes-2.6
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ee35a62bb7a2..2f12f9f12fcb 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -410,6 +410,7 @@ int scsi_execute_async(struct scsi_device *sdev, const unsigned char *cmd,
410 goto free_req; 410 goto free_req;
411 411
412 req->cmd_len = cmd_len; 412 req->cmd_len = cmd_len;
413 memset(req->cmd, 0, BLK_MAX_CDB); /* ATAPI hates garbage after CDB */
413 memcpy(req->cmd, cmd, req->cmd_len); 414 memcpy(req->cmd, cmd, req->cmd_len);
414 req->sense = sioc->sense; 415 req->sense = sioc->sense;
415 req->sense_len = 0; 416 req->sense_len = 0;
@@ -1119,7 +1120,7 @@ static int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
1119 req->buffer = NULL; 1120 req->buffer = NULL;
1120 } 1121 }
1121 1122
1122 BUG_ON(sizeof(req->cmd) > sizeof(cmd->cmnd)); 1123 BUILD_BUG_ON(sizeof(req->cmd) > sizeof(cmd->cmnd));
1123 memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd)); 1124 memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd));
1124 cmd->cmd_len = req->cmd_len; 1125 cmd->cmd_len = req->cmd_len;
1125 if (!req->data_len) 1126 if (!req->data_len)