Skip to content

Commit

Permalink
[SCSI] qla2xxx: Correct late-memset() of EFT buffer.
Browse files Browse the repository at this point in the history
Original code would clear the buffer after the firmware had
already been initialized to use the buffer, thus potentially
and inadvertantly clearing data previously DMA'd by the
firmware.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Jan 23, 2008
1 parent df613b9 commit fc44765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
goto cont_alloc;
}

memset(tc, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(ha, tc_dma, EFT_NUM_BUFFERS);
if (rval) {
qla_printk(KERN_WARNING, ha, "Unable to initialize "
Expand All @@ -779,7 +780,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
EFT_SIZE / 1024);

eft_size = EFT_SIZE;
memset(tc, 0, eft_size);
ha->eft_dma = tc_dma;
ha->eft = tc;

Expand Down

0 comments on commit fc44765

Please sign in to comment.