[SCSI] qla2xxx: Don't capture minidump for ISP82xx on flash update from application.
authorGiridhar Malavali <giridhar.malavali@qlogic.com>
Tue, 15 May 2012 18:34:25 +0000 (14:34 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 22 May 2012 10:43:52 +0000 (11:43 +0100)
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_bsg.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_nx.c

index 5b3b59409a511cccea85c1a2e1ccfd0a58f65e29..00df96b96a1b57d9bd4b6eed482fbb643c7feeb0 100644 (file)
@@ -576,6 +576,7 @@ qla2x00_sysfs_write_reset(struct file *filp, struct kobject *kobj,
                scsi_block_requests(vha->host);
                set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
                if (IS_QLA82XX(ha)) {
+                       ha->flags.isp82xx_no_md_cap = 1;
                        qla82xx_idc_lock(ha);
                        qla82xx_set_reset_owner(vha);
                        qla82xx_idc_unlock(ha);
index f709e6642e5bcccead57f93087692dac9a3cbf9c..449ac9c2b9c145addf37deb9c2c3ba0ab94ff156 100644 (file)
@@ -1400,6 +1400,9 @@ qla2x00_update_optrom(struct fc_bsg_job *bsg_job)
        if (rval)
                return rval;
 
+       /* Set the isp82xx_no_md_cap not to capture minidump */
+       ha->flags.isp82xx_no_md_cap = 1;
+
        sg_copy_to_buffer(bsg_job->request_payload.sg_list,
            bsg_job->request_payload.sg_cnt, ha->optrom_buffer,
            ha->optrom_region_size);
index 7aedd90115011a8513d2e4d8492182d2a458d7b6..13c3fe1316fa4697715584e513b988c3a5ae21eb 100644 (file)
@@ -2462,6 +2462,7 @@ struct qla_hw_data {
                uint32_t        thermal_supported:1;
                uint32_t        isp82xx_reset_hdlr_active:1;
                uint32_t        isp82xx_reset_owner:1;
+               uint32_t        isp82xx_no_md_cap:1;
                /* 28 bits */
        } flags;
 
index f88eb833206a6a03f202aa084c30fe3e16b78aa5..e957487636454eb6eb51377be8c8bc8877af73bd 100644 (file)
@@ -2050,7 +2050,7 @@ qla82xx_intr_handler(int irq, void *dev_id)
 
        rsp = (struct rsp_que *) dev_id;
        if (!rsp) {
-               ql_log(ql_log_info, NULL, 0xb054,
+               ql_log(ql_log_info, NULL, 0xb053,
                    "%s: NULL response queue pointer.\n", __func__);
                return IRQ_NONE;
        }
@@ -3128,7 +3128,7 @@ qla82xx_need_reset_handler(scsi_qla_host_t *vha)
                if (ql2xmdenable) {
                        if (qla82xx_md_collect(vha))
                                ql_log(ql_log_warn, vha, 0xb02c,
-                                   "Not able to collect minidump.\n");
+                                   "Minidump not collected.\n");
                } else
                        ql_log(ql_log_warn, vha, 0xb04f,
                            "Minidump disabled.\n");
@@ -4137,6 +4137,14 @@ qla82xx_md_collect(scsi_qla_host_t *vha)
                goto md_failed;
        }
 
+       if (ha->flags.isp82xx_no_md_cap) {
+               ql_log(ql_log_warn, vha, 0xb054,
+                   "Forced reset from application, "
+                   "ignore minidump capture\n");
+               ha->flags.isp82xx_no_md_cap = 0;
+               goto md_failed;
+       }
+
        if (qla82xx_validate_template_chksum(vha)) {
                ql_log(ql_log_info, vha, 0xb039,
                    "Template checksum validation error\n");