Commit eeb63c23 authored by Anand Lodnoor's avatar Anand Lodnoor Committed by Martin K. Petersen

scsi: megaraid_sas: Do not set HBA Operational if FW is not in operational state

After issuing a adapter reset, driver blindly used to set adprecovery flag
to OPERATIONAL state.  Add a check to see if the FW is operational before
setting the flag and marking reset adapter successful.

Link: https://lore.kernel.org/r/1579000882-20246-7-git-send-email-anand.lodnoor@broadcom.comSigned-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: default avatarAnand Lodnoor <anand.lodnoor@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9330a0fd
......@@ -4991,6 +4991,15 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int reason)
megasas_set_dynamic_target_properties(sdev, is_target_prop);
}
status_reg = instance->instancet->read_fw_status_reg
(instance);
abs_state = status_reg & MFI_STATE_MASK;
if (abs_state != MFI_STATE_OPERATIONAL) {
dev_info(&instance->pdev->dev,
"Adapter is not OPERATIONAL, state 0x%x for scsi:%d\n",
abs_state, instance->host->host_no);
goto out;
}
atomic_set(&instance->adprecovery, MEGASAS_HBA_OPERATIONAL);
dev_info(&instance->pdev->dev,
......
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