Commit f10fb852 authored by Shivasharan S's avatar Shivasharan S Committed by Martin K. Petersen

scsi: megaraid_sas: fw_reset_no_pci_access required for MFI adapters only

fw_reset_no_pci_access is only applicable for MFI controllers and is not
used for Fusion controllers.

For all Fusion controllers, driver can check reset adapter bit in
status register before performing a chip reset without
setting "fw_reset_no_pci_access".
Signed-off-by: default avatarShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4a0bcf36
...@@ -5488,7 +5488,6 @@ static int megasas_init_fw(struct megasas_instance *instance) ...@@ -5488,7 +5488,6 @@ static int megasas_init_fw(struct megasas_instance *instance)
int i, j, loop, fw_msix_count = 0; int i, j, loop, fw_msix_count = 0;
struct IOV_111 *iovPtr; struct IOV_111 *iovPtr;
struct fusion_context *fusion; struct fusion_context *fusion;
bool do_adp_reset = true;
fusion = instance->ctrl_context; fusion = instance->ctrl_context;
...@@ -5535,13 +5534,18 @@ static int megasas_init_fw(struct megasas_instance *instance) ...@@ -5535,13 +5534,18 @@ static int megasas_init_fw(struct megasas_instance *instance)
} }
if (megasas_transition_to_ready(instance, 0)) { if (megasas_transition_to_ready(instance, 0)) {
if (instance->adapter_type >= INVADER_SERIES) { if (instance->adapter_type != MFI_SERIES) {
status_reg = instance->instancet->read_fw_status_reg( status_reg = instance->instancet->read_fw_status_reg(
instance); instance);
do_adp_reset = status_reg & MFI_RESET_ADAPTER; if (status_reg & MFI_RESET_ADAPTER) {
instance->instancet->adp_reset
(instance, instance->reg_set);
if (megasas_transition_to_ready(instance, 0))
goto fail_ready_state;
} else {
goto fail_ready_state;
} }
} else {
if (do_adp_reset) {
atomic_set(&instance->fw_reset_no_pci_access, 1); atomic_set(&instance->fw_reset_no_pci_access, 1);
instance->instancet->adp_reset instance->instancet->adp_reset
(instance, instance->reg_set); (instance, instance->reg_set);
...@@ -5555,8 +5559,6 @@ static int megasas_init_fw(struct megasas_instance *instance) ...@@ -5555,8 +5559,6 @@ static int megasas_init_fw(struct megasas_instance *instance)
if (megasas_transition_to_ready(instance, 0)) if (megasas_transition_to_ready(instance, 0))
goto fail_ready_state; goto fail_ready_state;
} else {
goto fail_ready_state;
} }
} }
......
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