summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_nx.c
diff options
context:
space:
mode:
authorGiridhar Malavali <giridhar.malavali@qlogic.com>2011-08-16 11:31:54 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-08-29 00:14:57 -0700
commit3173167f015b779e549e1be04707316cce1b57f1 (patch)
tree36c87222aaa7d50b75edfdff3ba7a4904b871e31 /drivers/scsi/qla2xxx/qla_nx.c
parentb668ae37f10e5cefe65303150867e3fa2e631b93 (diff)
downloadop-kernel-dev-3173167f015b779e549e1be04707316cce1b57f1.zip
op-kernel-dev-3173167f015b779e549e1be04707316cce1b57f1.tar.gz
[SCSI] qla2xxx: Issue mailbox command only when firmware hung bit is reset for ISP82xx.
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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c74
1 files changed, 41 insertions, 33 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index e5ae84c..77fde8b 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -3619,44 +3619,52 @@ qla82xx_need_reset_handler(scsi_qla_host_t *vha)
}
}
-static void
+int
qla82xx_check_md_needed(scsi_qla_host_t *vha)
{
struct qla_hw_data *ha = vha->hw;
uint16_t fw_major_version, fw_minor_version, fw_subminor_version;
- uint16_t fw_attributes;
- uint32_t fw_memory_size, mpi_capabilities;
- uint8_t mpi_version[3], phy_version[3];
-
- if (!ha->fw_dumped) {
- qla2x00_get_fw_version(vha,
- &fw_major_version,
- &fw_minor_version,
- &fw_subminor_version,
- &fw_attributes, &fw_memory_size,
- mpi_version, &mpi_capabilities,
- phy_version);
-
- if (fw_major_version != ha->fw_major_version ||
- fw_minor_version != ha->fw_minor_version ||
- fw_subminor_version != ha->fw_subminor_version) {
- ql_log(ql_log_info, vha, 0xb02d,
- "Firmware version differs "
- "Previous version: %d:%d:%d - "
- "New version: %d:%d:%d\n",
- ha->fw_major_version,
- ha->fw_minor_version, ha->fw_subminor_version,
- fw_major_version, fw_minor_version,
- fw_subminor_version);
- /* Release MiniDump resources */
- qla82xx_md_free(vha);
- /* ALlocate MiniDump resources */
- qla82xx_md_prep(vha);
+ int rval = QLA_SUCCESS;
+
+ fw_major_version = ha->fw_major_version;
+ fw_minor_version = ha->fw_minor_version;
+ fw_subminor_version = ha->fw_subminor_version;
+
+ rval = qla2x00_get_fw_version(vha, &ha->fw_major_version,
+ &ha->fw_minor_version, &ha->fw_subminor_version,
+ &ha->fw_attributes, &ha->fw_memory_size,
+ ha->mpi_version, &ha->mpi_capabilities,
+ ha->phy_version);
+
+ if (rval != QLA_SUCCESS)
+ return rval;
+
+ if (ql2xmdenable) {
+ if (!ha->fw_dumped) {
+ if (fw_major_version != ha->fw_major_version ||
+ fw_minor_version != ha->fw_minor_version ||
+ fw_subminor_version != ha->fw_subminor_version) {
+
+ ql_log(ql_log_info, vha, 0xb02d,
+ "Firmware version differs "
+ "Previous version: %d:%d:%d - "
+ "New version: %d:%d:%d\n",
+ ha->fw_major_version,
+ ha->fw_minor_version,
+ ha->fw_subminor_version,
+ fw_major_version, fw_minor_version,
+ fw_subminor_version);
+ /* Release MiniDump resources */
+ qla82xx_md_free(vha);
+ /* ALlocate MiniDump resources */
+ qla82xx_md_prep(vha);
+ } else
+ ql_log(ql_log_info, vha, 0xb02e,
+ "Firmware dump available to retrieve\n",
+ vha->host_no);
}
- } else
- ql_log(ql_log_info, vha, 0xb02e,
- "Firmware dump available to retrieve\n",
- vha->host_no);
+ }
+ return rval;
}
OpenPOWER on IntegriCloud