From: Andrew Vasquez Date: Tue, 13 May 2008 05:21:12 +0000 (-0700) Subject: [SCSI] qla2xxx: Don't depend on mailbox return values while enabling FCE tracing. X-Git-Tag: v2.6.26-rc5~8^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa0926df0f5cf63b998a79127519bdcfe9bf05f7;p=linux-2.6 [SCSI] qla2xxx: Don't depend on mailbox return values while enabling FCE tracing. Recent firmwares no longer return the 'number of buffers' in mailbox6. The original code may result in a potential panic during a FW-dump process due to the driver misinterpreting the size of the allocated buffer. Signed-off-by: Andrew Vasquez Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 3800876f96..bf3a6f0b8b 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -2508,7 +2508,7 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *ha, dma_addr_t fce_dma, if (mb) memcpy(mb, mcp->mb, 8 * sizeof(*mb)); if (dwords) - *dwords = mcp->mb[6]; + *dwords = buffers; } return rval;