[SCSI] Fix incorrect pointer in megaraid.c MODE_SENSE emulation
authorMark Lord <lkml@rtr.ca>
Wed, 7 Dec 2005 22:46:57 +0000 (17:46 -0500)
committerJames Bottomley <jejb@mulgrave.(none)>
Thu, 8 Dec 2005 14:08:54 +0000 (09:08 -0500)
The SCSI megaraid drive goes to great effort to kmap
the scatterlist buffer (if used), but then uses the
wrong pointer when copying to it afterward.

Signed-off-by: Mark Lord <lkml@rtr.ca>
Acked by: Ju, Seokmann <Seokmann.Ju@engenio.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/megaraid.c

index f9792528e33fb473d7e03314d5318b4aa0863ef9..578143e93a6f3b6c8afa4d64e1b7cda7e7a05515 100644 (file)
@@ -664,7 +664,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
                                        sg->offset;
                        } else
                                buf = cmd->request_buffer;
-                       memset(cmd->request_buffer, 0, cmd->cmnd[4]);
+                       memset(buf, 0, cmd->cmnd[4]);
                        if (cmd->use_sg) {
                                struct scatterlist *sg;