aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorSumit.Saxena@avagotech.com <Sumit.Saxena@avagotech.com>2014-11-17 04:54:18 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-24 08:38:49 -0500
commitac340c5f2e033f001a081817019d6f3835bf6267 (patch)
tree6330fa2ec798df2a0d05810e6aaccb3aac98b52a /drivers/scsi/megaraid
parentd009b5760f577db3fef5cbda5ccf3304fa4f57d7 (diff)
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>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 98dfc1d1079b..4e259edd467a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2803,11 +2803,6 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
2803 } 2803 }
2804 } 2804 }
2805 2805
2806 clear_bit(MEGASAS_FUSION_IN_RESET,
2807 &instance->reset_flags);
2808 instance->instancet->enable_intr(instance);
2809 instance->adprecovery = MEGASAS_HBA_OPERATIONAL;
2810
2811 if (megasas_get_ctrl_info(instance)) { 2806 if (megasas_get_ctrl_info(instance)) {
2812 dev_info(&instance->pdev->dev, 2807 dev_info(&instance->pdev->dev,
2813 "Failed from %s %d\n", 2808 "Failed from %s %d\n",
@@ -2825,6 +2820,11 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
2825 if (!megasas_get_map_info(instance)) 2820 if (!megasas_get_map_info(instance))
2826 megasas_sync_map_info(instance); 2821 megasas_sync_map_info(instance);
2827 2822
2823 clear_bit(MEGASAS_FUSION_IN_RESET,
2824 &instance->reset_flags);
2825 instance->instancet->enable_intr(instance);
2826 instance->adprecovery = MEGASAS_HBA_OPERATIONAL;
2827
2828 /* Restart SR-IOV heartbeat */ 2828 /* Restart SR-IOV heartbeat */
2829 if (instance->requestorId) { 2829 if (instance->requestorId) {
2830 if (!megasas_sriov_start_heartbeat(instance, 0)) 2830 if (!megasas_sriov_start_heartbeat(instance, 0))
@@ -2841,14 +2841,14 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int iotimeout)
2841 "successful for scsi%d.\n", 2841 "successful for scsi%d.\n",
2842 instance->host->host_no); 2842 instance->host->host_no);
2843 2843
2844 if (instance->crash_dump_drv_support) { 2844 if (instance->crash_dump_drv_support &&
2845 if (instance->crash_dump_app_support) 2845 instance->crash_dump_app_support)
2846 megasas_set_crash_dump_params(instance, 2846 megasas_set_crash_dump_params(instance,
2847 MR_CRASH_BUF_TURN_ON); 2847 MR_CRASH_BUF_TURN_ON);
2848 else 2848 else
2849 megasas_set_crash_dump_params(instance, 2849 megasas_set_crash_dump_params(instance,
2850 MR_CRASH_BUF_TURN_OFF); 2850 MR_CRASH_BUF_TURN_OFF);
2851 } 2851
2852 retval = SUCCESS; 2852 retval = SUCCESS;
2853 goto out; 2853 goto out;
2854 } 2854 }