* [PATCH RESEND 5/7] megaraid_sas : Make HBA operational after LD_MAP_SYNC DCMD in OCR path
@ 2014-11-17 9:54 Sumit.Saxena
2014-11-21 13:51 ` Tomas Henzl
0 siblings, 1 reply; 2+ messages in thread
From: Sumit.Saxena @ 2014-11-17 9:54 UTC (permalink / raw)
To: linux-scsi; +Cc: martin.petersen, hch, jbottomley, kashyap.desai
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>
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 26 +++++++++++++-------------
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 98dfc1d..4e259ed 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)
}
}
- 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)) {
dev_info(&instance->pdev->dev,
"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))
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 */
if (instance->requestorId) {
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",
instance->host->host_no);
- if (instance->crash_dump_drv_support) {
- if (instance->crash_dump_app_support)
- megasas_set_crash_dump_params(instance,
- MR_CRASH_BUF_TURN_ON);
- else
- megasas_set_crash_dump_params(instance,
- MR_CRASH_BUF_TURN_OFF);
- }
+ if (instance->crash_dump_drv_support &&
+ instance->crash_dump_app_support)
+ megasas_set_crash_dump_params(instance,
+ MR_CRASH_BUF_TURN_ON);
+ else
+ megasas_set_crash_dump_params(instance,
+ MR_CRASH_BUF_TURN_OFF);
+
retval = SUCCESS;
goto out;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND 5/7] megaraid_sas : Make HBA operational after LD_MAP_SYNC DCMD in OCR path
2014-11-17 9:54 [PATCH RESEND 5/7] megaraid_sas : Make HBA operational after LD_MAP_SYNC DCMD in OCR path Sumit.Saxena
@ 2014-11-21 13:51 ` Tomas Henzl
0 siblings, 0 replies; 2+ messages in thread
From: Tomas Henzl @ 2014-11-21 13:51 UTC (permalink / raw)
To: Sumit.Saxena, linux-scsi; +Cc: martin.petersen, hch, jbottomley, kashyap.desai
On 11/17/2014 10:54 AM, Sumit.Saxena@avagotech.com wrote:
> 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>
> ---
> drivers/scsi/megaraid/megaraid_sas_fusion.c | 26 +++++++++++++-------------
> 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 98dfc1d..4e259ed 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)
> }
> }
>
> - 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)) {
> dev_info(&instance->pdev->dev,
> "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))
> 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 */
> if (instance->requestorId) {
> 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",
> instance->host->host_no);
>
> - if (instance->crash_dump_drv_support) {
> - if (instance->crash_dump_app_support)
> - megasas_set_crash_dump_params(instance,
> - MR_CRASH_BUF_TURN_ON);
> - else
> - megasas_set_crash_dump_params(instance,
> - MR_CRASH_BUF_TURN_OFF);
> - }
> + if (instance->crash_dump_drv_support &&
> + instance->crash_dump_app_support)
> + megasas_set_crash_dump_params(instance,
> + MR_CRASH_BUF_TURN_ON);
> + else
> + megasas_set_crash_dump_params(instance,
> + MR_CRASH_BUF_TURN_OFF);
> +
> retval = SUCCESS;
> goto out;
> }
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-21 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 9:54 [PATCH RESEND 5/7] megaraid_sas : Make HBA operational after LD_MAP_SYNC DCMD in OCR path Sumit.Saxena
2014-11-21 13:51 ` Tomas Henzl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).