|
@@ -3547,11 +3547,21 @@ static int megasas_init_fw(struct megasas_instance *instance)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * We expect the FW state to be READY
|
|
|
- */
|
|
|
- if (megasas_transition_to_ready(instance, 0))
|
|
|
- goto fail_ready_state;
|
|
|
+ if (megasas_transition_to_ready(instance, 0)) {
|
|
|
+ atomic_set(&instance->fw_reset_no_pci_access, 1);
|
|
|
+ instance->instancet->adp_reset
|
|
|
+ (instance, instance->reg_set);
|
|
|
+ atomic_set(&instance->fw_reset_no_pci_access, 0);
|
|
|
+ dev_info(&instance->pdev->dev,
|
|
|
+ "megasas: FW restarted successfully from %s!\n",
|
|
|
+ __func__);
|
|
|
+
|
|
|
+ /*waitting for about 30 second before retry*/
|
|
|
+ ssleep(30);
|
|
|
+
|
|
|
+ if (megasas_transition_to_ready(instance, 0))
|
|
|
+ goto fail_ready_state;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
* MSI-X host index 0 is common for all adapter.
|