megaraid_sas: make HBA operational after LD_MAP_SYNC DCMD in OCR path

In OCR(Online Controller Reset) path, driver sets adapter state to
MEGASAS_HBA_OPERATIONAL before getting new RAID map.  There will be a small
window where IO will come from OS with old RAID map. This patch will update
adapter state to MEGASAS_HBA_OPERATIONAL, only after driver has new RAID
map to avoid any IOs getting build using old RAID map.

Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Sumit.Saxena@avagotech.com 2014-11-17 15:24:18 +05:30 committed by Christoph Hellwig
parent d009b5760f
commit ac340c5f2e
1 changed files with 13 additions and 13 deletions

View File

@ -2803,11 +2803,6 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
} }
} }
clear_bit(MEGASAS_FUSION_IN_RESET,
&instance->reset_flags);
instance->instancet->enable_intr(instance);
instance->adprecovery = MEGASAS_HBA_OPERATIONAL;
if (megasas_get_ctrl_info(instance)) { if (megasas_get_ctrl_info(instance)) {
dev_info(&instance->pdev->dev, dev_info(&instance->pdev->dev,
"Failed from %s %d\n", "Failed from %s %d\n",
@ -2825,6 +2820,11 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
if (!megasas_get_map_info(instance)) if (!megasas_get_map_info(instance))
megasas_sync_map_info(instance); megasas_sync_map_info(instance);
clear_bit(MEGASAS_FUSION_IN_RESET,
&instance->reset_flags);
instance->instancet->enable_intr(instance);
instance->adprecovery = MEGASAS_HBA_OPERATIONAL;
/* Restart SR-IOV heartbeat */ /* Restart SR-IOV heartbeat */
if (instance->requestorId) { if (instance->requestorId) {
if (!megasas_sriov_start_heartbeat(instance, 0)) if (!megasas_sriov_start_heartbeat(instance, 0))
@ -2841,14 +2841,14 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
"successful for scsi%d.\n", "successful for scsi%d.\n",
instance->host->host_no); instance->host->host_no);
if (instance->crash_dump_drv_support) { if (instance->crash_dump_drv_support &&
if (instance->crash_dump_app_support) instance->crash_dump_app_support)
megasas_set_crash_dump_params(instance, megasas_set_crash_dump_params(instance,
MR_CRASH_BUF_TURN_ON); MR_CRASH_BUF_TURN_ON);
else else
megasas_set_crash_dump_params(instance, megasas_set_crash_dump_params(instance,
MR_CRASH_BUF_TURN_OFF); MR_CRASH_BUF_TURN_OFF);
}
retval = SUCCESS; retval = SUCCESS;
goto out; goto out;
} }