scsi: qla2xxx: Skip zero queue count entry during FW dump capture

If queue count is zero while reading FW dump template, for entry
T263/T274, skip capturing those entries during FW dump capture.

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Joe Carnuccio 2017-08-23 15:05:22 -07:00 committed by Martin K. Petersen
parent a07fc0a42e
commit 998722d183

View file

@ -449,8 +449,12 @@ qla27xx_fwdt_entry_t263(struct scsi_qla_host *vha,
qla27xx_skip_entry(ent, buf); qla27xx_skip_entry(ent, buf);
} }
if (buf) if (buf) {
ent->t263.num_queues = count; if (count)
ent->t263.num_queues = count;
else
qla27xx_skip_entry(ent, buf);
}
return false; return false;
} }
@ -704,11 +708,12 @@ qla27xx_fwdt_entry_t274(struct scsi_qla_host *vha,
qla27xx_skip_entry(ent, buf); qla27xx_skip_entry(ent, buf);
} }
if (buf) if (buf) {
ent->t274.num_queues = count; if (count)
ent->t274.num_queues = count;
if (!count) else
qla27xx_skip_entry(ent, buf); qla27xx_skip_entry(ent, buf);
}
return false; return false;
} }