diff options
author | Joe Carnuccio <joe.carnuccio@cavium.com> | 2022-01-09 21:02:17 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-08 14:40:37 +0200 |
commit | 0e4a89efc2234088aae988da4cba9837d372f182 (patch) | |
tree | abd22404045e493c8b676066d9ad8fbaa9603be8 | |
parent | ef10a7530c34f4e4e4372f8509881767d5fc041d (diff) | |
download | linux-stable-0e4a89efc2234088aae988da4cba9837d372f182.tar.gz linux-stable-0e4a89efc2234088aae988da4cba9837d372f182.tar.bz2 linux-stable-0e4a89efc2234088aae988da4cba9837d372f182.zip |
scsi: qla2xxx: Check for firmware dump already collected
commit cfbafad7c6032d449a5a07f2d273acd2437bbc6a upstream.
While allocating firmware dump, check if dump is already collected and do
not re-allocate the buffer.
Link: https://lore.kernel.org/r/20220110050218.3958-17-njavali@marvell.com
Cc: stable@vger.kernel.org
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 7ca612c9019f..88c2f95e3c0e 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3312,6 +3312,14 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) struct rsp_que *rsp = ha->rsp_q_map[0]; struct qla2xxx_fw_dump *fw_dump; + if (ha->fw_dump) { + ql_dbg(ql_dbg_init, vha, 0x00bd, + "Firmware dump already allocated.\n"); + return; + } + + ha->fw_dumped = 0; + ha->fw_dump_cap_flags = 0; dump_size = fixed_size = mem_size = eft_size = fce_size = mq_size = 0; req_q_size = rsp_q_size = 0; |