mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-28 03:53:29 +07:00
[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>
This commit is contained in:
parent
b668ae37f1
commit
3173167f01
@ -574,6 +574,7 @@ extern int qla82xx_mbx_intr_enable(scsi_qla_host_t *);
|
|||||||
extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *);
|
extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *);
|
||||||
extern void qla82xx_start_iocbs(srb_t *);
|
extern void qla82xx_start_iocbs(srb_t *);
|
||||||
extern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *);
|
extern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *);
|
||||||
|
extern int qla82xx_check_md_needed(scsi_qla_host_t *);
|
||||||
extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *);
|
extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *);
|
||||||
extern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int);
|
extern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int);
|
||||||
extern char *qdev_state(uint32_t);
|
extern char *qdev_state(uint32_t);
|
||||||
|
@ -1480,13 +1480,19 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
|
|||||||
if (rval == QLA_SUCCESS) {
|
if (rval == QLA_SUCCESS) {
|
||||||
enable_82xx_npiv:
|
enable_82xx_npiv:
|
||||||
fw_major_version = ha->fw_major_version;
|
fw_major_version = ha->fw_major_version;
|
||||||
rval = qla2x00_get_fw_version(vha,
|
if (IS_QLA82XX(ha))
|
||||||
&ha->fw_major_version,
|
qla82xx_check_md_needed(vha);
|
||||||
&ha->fw_minor_version,
|
else {
|
||||||
&ha->fw_subminor_version,
|
rval = qla2x00_get_fw_version(vha,
|
||||||
&ha->fw_attributes, &ha->fw_memory_size,
|
&ha->fw_major_version,
|
||||||
ha->mpi_version, &ha->mpi_capabilities,
|
&ha->fw_minor_version,
|
||||||
ha->phy_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)
|
if (rval != QLA_SUCCESS)
|
||||||
goto failed;
|
goto failed;
|
||||||
ha->flags.npiv_supported = 0;
|
ha->flags.npiv_supported = 0;
|
||||||
@ -5441,11 +5447,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
|
|||||||
clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags);
|
clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags);
|
||||||
|
|
||||||
/* Update the firmware version */
|
/* Update the firmware version */
|
||||||
qla2x00_get_fw_version(vha, &ha->fw_major_version,
|
status = qla82xx_check_md_needed(vha);
|
||||||
&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 (ha->fce) {
|
if (ha->fce) {
|
||||||
ha->flags.fce_enabled = 1;
|
ha->flags.fce_enabled = 1;
|
||||||
|
@ -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)
|
qla82xx_check_md_needed(scsi_qla_host_t *vha)
|
||||||
{
|
{
|
||||||
struct qla_hw_data *ha = vha->hw;
|
struct qla_hw_data *ha = vha->hw;
|
||||||
uint16_t fw_major_version, fw_minor_version, fw_subminor_version;
|
uint16_t fw_major_version, fw_minor_version, fw_subminor_version;
|
||||||
uint16_t fw_attributes;
|
int rval = QLA_SUCCESS;
|
||||||
uint32_t fw_memory_size, mpi_capabilities;
|
|
||||||
uint8_t mpi_version[3], phy_version[3];
|
|
||||||
|
|
||||||
if (!ha->fw_dumped) {
|
fw_major_version = ha->fw_major_version;
|
||||||
qla2x00_get_fw_version(vha,
|
fw_minor_version = ha->fw_minor_version;
|
||||||
&fw_major_version,
|
fw_subminor_version = ha->fw_subminor_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 ||
|
rval = qla2x00_get_fw_version(vha, &ha->fw_major_version,
|
||||||
fw_minor_version != ha->fw_minor_version ||
|
&ha->fw_minor_version, &ha->fw_subminor_version,
|
||||||
fw_subminor_version != ha->fw_subminor_version) {
|
&ha->fw_attributes, &ha->fw_memory_size,
|
||||||
ql_log(ql_log_info, vha, 0xb02d,
|
ha->mpi_version, &ha->mpi_capabilities,
|
||||||
"Firmware version differs "
|
ha->phy_version);
|
||||||
"Previous version: %d:%d:%d - "
|
|
||||||
"New version: %d:%d:%d\n",
|
if (rval != QLA_SUCCESS)
|
||||||
ha->fw_major_version,
|
return rval;
|
||||||
ha->fw_minor_version, ha->fw_subminor_version,
|
|
||||||
fw_major_version, fw_minor_version,
|
if (ql2xmdenable) {
|
||||||
fw_subminor_version);
|
if (!ha->fw_dumped) {
|
||||||
/* Release MiniDump resources */
|
if (fw_major_version != ha->fw_major_version ||
|
||||||
qla82xx_md_free(vha);
|
fw_minor_version != ha->fw_minor_version ||
|
||||||
/* ALlocate MiniDump resources */
|
fw_subminor_version != ha->fw_subminor_version) {
|
||||||
qla82xx_md_prep(vha);
|
|
||||||
|
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,
|
return rval;
|
||||||
"Firmware dump available to retrieve\n",
|
|
||||||
vha->host_no);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user