diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_nx.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index 70793bf9cbc..6daa25c50a9 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c | |||
@@ -2283,6 +2283,20 @@ static void qla4_8xxx_uevent_emit(struct scsi_qla_host *ha, u32 code) | |||
2283 | kobject_uevent_env(&(&ha->pdev->dev)->kobj, KOBJ_CHANGE, envp); | 2283 | kobject_uevent_env(&(&ha->pdev->dev)->kobj, KOBJ_CHANGE, envp); |
2284 | } | 2284 | } |
2285 | 2285 | ||
2286 | static void qla4_8xxx_get_minidump(struct scsi_qla_host *ha) | ||
2287 | { | ||
2288 | if (ql4xenablemd && test_bit(AF_FW_RECOVERY, &ha->flags) && | ||
2289 | !test_bit(AF_82XX_FW_DUMPED, &ha->flags)) { | ||
2290 | if (!qla4_8xxx_collect_md_data(ha)) { | ||
2291 | qla4_8xxx_uevent_emit(ha, QL4_UEVENT_CODE_FW_DUMP); | ||
2292 | set_bit(AF_82XX_FW_DUMPED, &ha->flags); | ||
2293 | } else { | ||
2294 | ql4_printk(KERN_INFO, ha, "%s: Unable to collect minidump\n", | ||
2295 | __func__); | ||
2296 | } | ||
2297 | } | ||
2298 | } | ||
2299 | |||
2286 | /** | 2300 | /** |
2287 | * qla4_8xxx_device_bootstrap - Initialize device, set DEV_READY, start fw | 2301 | * qla4_8xxx_device_bootstrap - Initialize device, set DEV_READY, start fw |
2288 | * @ha: pointer to adapter structure | 2302 | * @ha: pointer to adapter structure |
@@ -2338,15 +2352,7 @@ dev_initialize: | |||
2338 | QLA8XXX_DEV_INITIALIZING); | 2352 | QLA8XXX_DEV_INITIALIZING); |
2339 | 2353 | ||
2340 | ha->isp_ops->idc_unlock(ha); | 2354 | ha->isp_ops->idc_unlock(ha); |
2341 | if (ql4xenablemd && test_bit(AF_FW_RECOVERY, &ha->flags) && | 2355 | qla4_8xxx_get_minidump(ha); |
2342 | !test_and_set_bit(AF_82XX_FW_DUMPED, &ha->flags)) { | ||
2343 | if (!qla4_8xxx_collect_md_data(ha)) { | ||
2344 | qla4_8xxx_uevent_emit(ha, QL4_UEVENT_CODE_FW_DUMP); | ||
2345 | } else { | ||
2346 | ql4_printk(KERN_INFO, ha, "Unable to collect minidump\n"); | ||
2347 | clear_bit(AF_82XX_FW_DUMPED, &ha->flags); | ||
2348 | } | ||
2349 | } | ||
2350 | rval = ha->isp_ops->restart_firmware(ha); | 2356 | rval = ha->isp_ops->restart_firmware(ha); |
2351 | ha->isp_ops->idc_lock(ha); | 2357 | ha->isp_ops->idc_lock(ha); |
2352 | 2358 | ||