mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 21:26:31 +00:00
qla2x00t-32gbit: Capture FW dump on MPI heartbeat stop event
For MPI heartbeat stop Async Event, this patch would capture MPI FW dump and chip reset. FW will tell which function to capture FW dump for. Link: https://lore.kernel.org/r/20190912180918.6436-13-hmadhani@marvell.com Reviewed-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8708 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -102,8 +102,10 @@ qla2x00_sysfs_write_fw_dump(struct file *filp, struct kobject *kobj,
|
||||
qla8044_idc_lock(ha);
|
||||
qla82xx_set_reset_owner(vha);
|
||||
qla8044_idc_unlock(ha);
|
||||
} else
|
||||
} else {
|
||||
ha->fw_dump_mpi = 1;
|
||||
qla2x00_system_error(vha);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (IS_P3P_TYPE(ha)) {
|
||||
|
||||
@@ -1239,11 +1239,32 @@ global_port_update:
|
||||
break;
|
||||
|
||||
case MBA_IDC_AEN:
|
||||
mb[4] = RD_REG_WORD(®24->mailbox4);
|
||||
mb[5] = RD_REG_WORD(®24->mailbox5);
|
||||
mb[6] = RD_REG_WORD(®24->mailbox6);
|
||||
mb[7] = RD_REG_WORD(®24->mailbox7);
|
||||
qla83xx_handle_8200_aen(vha, mb);
|
||||
if (IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
|
||||
ha->flags.fw_init_done = 0;
|
||||
ql_log(ql_log_warn, vha, 0xffff,
|
||||
"MPI Heartbeat stop. Chip reset needed. MB0[%xh] MB1[%xh] MB2[%xh] MB3[%xh]\n",
|
||||
mb[0], mb[1], mb[2], mb[3]);
|
||||
|
||||
if ((mb[1] & BIT_8) ||
|
||||
(mb[2] & BIT_8)) {
|
||||
ql_log(ql_log_warn, vha, 0xd013,
|
||||
"MPI Heartbeat stop. FW dump needed\n");
|
||||
ha->fw_dump_mpi = 1;
|
||||
ha->isp_ops->fw_dump(vha, 1);
|
||||
}
|
||||
set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
|
||||
qla2xxx_wake_dpc(vha);
|
||||
} else if (IS_QLA83XX(ha)) {
|
||||
mb[4] = RD_REG_WORD(®24->mailbox4);
|
||||
mb[5] = RD_REG_WORD(®24->mailbox5);
|
||||
mb[6] = RD_REG_WORD(®24->mailbox6);
|
||||
mb[7] = RD_REG_WORD(®24->mailbox7);
|
||||
qla83xx_handle_8200_aen(vha, mb);
|
||||
} else {
|
||||
ql_dbg(ql_dbg_async, vha, 0x5052,
|
||||
"skip Heartbeat processing mb0-3=[0x%04x] [0x%04x] [0x%04x] [0x%04x]\n",
|
||||
mb[0], mb[1], mb[2], mb[3]);
|
||||
}
|
||||
break;
|
||||
|
||||
case MBA_DPORT_DIAGNOSTICS:
|
||||
|
||||
@@ -1017,8 +1017,9 @@ qla27xx_fwdump(scsi_qla_host_t *vha, int hardware_locked)
|
||||
uint j;
|
||||
ulong len;
|
||||
void *buf = vha->hw->fw_dump;
|
||||
uint count = vha->hw->fw_dump_mpi ? 2 : 1;
|
||||
|
||||
for (j = 0; j < 2; j++, fwdt++, buf += len) {
|
||||
for (j = 0; j < count; j++, fwdt++, buf += len) {
|
||||
ql_log(ql_log_warn, vha, 0xd011,
|
||||
"-> fwdt%u running...\n", j);
|
||||
if (!fwdt->template) {
|
||||
@@ -1046,6 +1047,7 @@ qla27xx_fwdump(scsi_qla_host_t *vha, int hardware_locked)
|
||||
}
|
||||
|
||||
bailout:
|
||||
vha->hw->fw_dump_mpi = 0;
|
||||
#ifndef __CHECKER__
|
||||
if (!hardware_locked)
|
||||
spin_unlock_irqrestore(&vha->hw->hardware_lock, flags);
|
||||
|
||||
Reference in New Issue
Block a user