Commit fc44765f authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Correct late-memset() of EFT buffer.

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: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent df613b96
...@@ -766,6 +766,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha) ...@@ -766,6 +766,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
goto cont_alloc; goto cont_alloc;
} }
memset(tc, 0, EFT_SIZE);
rval = qla2x00_enable_eft_trace(ha, tc_dma, EFT_NUM_BUFFERS); rval = qla2x00_enable_eft_trace(ha, tc_dma, EFT_NUM_BUFFERS);
if (rval) { if (rval) {
qla_printk(KERN_WARNING, ha, "Unable to initialize " qla_printk(KERN_WARNING, ha, "Unable to initialize "
...@@ -779,7 +780,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha) ...@@ -779,7 +780,6 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
EFT_SIZE / 1024); EFT_SIZE / 1024);
eft_size = EFT_SIZE; eft_size = EFT_SIZE;
memset(tc, 0, eft_size);
ha->eft_dma = tc_dma; ha->eft_dma = tc_dma;
ha->eft = tc; ha->eft = tc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment