Commit aec07cae authored by Vikas Chaudhary's avatar Vikas Chaudhary Committed by James Bottomley

[SCSI] qla4xxx: Added new function qla4_8xxx_get_minidump

Move minidump code from qla4_8xxx_device_bootstrap() to
new function qla4_8xxx_get_minidump() to make code more
modular.
Signed-off-by: default avatarLalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 83dbdf6f
...@@ -2283,6 +2283,20 @@ static void qla4_8xxx_uevent_emit(struct scsi_qla_host *ha, u32 code) ...@@ -2283,6 +2283,20 @@ static void qla4_8xxx_uevent_emit(struct scsi_qla_host *ha, u32 code)
kobject_uevent_env(&(&ha->pdev->dev)->kobj, KOBJ_CHANGE, envp); kobject_uevent_env(&(&ha->pdev->dev)->kobj, KOBJ_CHANGE, envp);
} }
static void qla4_8xxx_get_minidump(struct scsi_qla_host *ha)
{
if (ql4xenablemd && test_bit(AF_FW_RECOVERY, &ha->flags) &&
!test_bit(AF_82XX_FW_DUMPED, &ha->flags)) {
if (!qla4_8xxx_collect_md_data(ha)) {
qla4_8xxx_uevent_emit(ha, QL4_UEVENT_CODE_FW_DUMP);
set_bit(AF_82XX_FW_DUMPED, &ha->flags);
} else {
ql4_printk(KERN_INFO, ha, "%s: Unable to collect minidump\n",
__func__);
}
}
}
/** /**
* qla4_8xxx_device_bootstrap - Initialize device, set DEV_READY, start fw * qla4_8xxx_device_bootstrap - Initialize device, set DEV_READY, start fw
* @ha: pointer to adapter structure * @ha: pointer to adapter structure
...@@ -2338,15 +2352,7 @@ qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha) ...@@ -2338,15 +2352,7 @@ qla4_8xxx_device_bootstrap(struct scsi_qla_host *ha)
QLA8XXX_DEV_INITIALIZING); QLA8XXX_DEV_INITIALIZING);
ha->isp_ops->idc_unlock(ha); ha->isp_ops->idc_unlock(ha);
if (ql4xenablemd && test_bit(AF_FW_RECOVERY, &ha->flags) && qla4_8xxx_get_minidump(ha);
!test_and_set_bit(AF_82XX_FW_DUMPED, &ha->flags)) {
if (!qla4_8xxx_collect_md_data(ha)) {
qla4_8xxx_uevent_emit(ha, QL4_UEVENT_CODE_FW_DUMP);
} else {
ql4_printk(KERN_INFO, ha, "Unable to collect minidump\n");
clear_bit(AF_82XX_FW_DUMPED, &ha->flags);
}
}
rval = ha->isp_ops->restart_firmware(ha); rval = ha->isp_ops->restart_firmware(ha);
ha->isp_ops->idc_lock(ha); ha->isp_ops->idc_lock(ha);
......
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