Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0353301 authored by Mark Lord's avatar Mark Lord Committed by James Bottomley
Browse files

[SCSI] Fix incorrect pointer in megaraid.c MODE_SENSE emulation



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: default avatarMark Lord <lkml@rtr.ca>
Acked by: Ju, Seokmann <Seokmann.Ju@engenio.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 0da69df1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -664,7 +664,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
					sg->offset;
					sg->offset;
			} else
			} else
				buf = cmd->request_buffer;
				buf = cmd->request_buffer;
			memset(cmd->request_buffer, 0, cmd->cmnd[4]);
			memset(buf, 0, cmd->cmnd[4]);
			if (cmd->use_sg) {
			if (cmd->use_sg) {
				struct scatterlist *sg;
				struct scatterlist *sg;