* Re: [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure
2016-03-10 10:14 [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure Sumit Saxena
@ 2016-03-10 10:40 ` Johannes Thumshirn
2016-03-10 13:06 ` Hannes Reinecke
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2016-03-10 10:40 UTC (permalink / raw)
To: Sumit Saxena
Cc: thenzl, jbottomley, martin.petersen, hch, linux-scsi,
kashyap.desai
On Thu, Mar 10, 2016 at 02:14:37AM -0800, Sumit Saxena wrote:
> There are few MFI adapters which do not support MR_DCMD_PD_LIST_QUERY so
> if MFI adapters fail this DCMD, it should not be considered as FATAL and
> driver should not issue kill adapter and set per controller's instance
> variable- pd_list_not_supported so that same variable can be used inside
> functions- slave_alloc and slave_configure to allow firmware scan.
>
> Killing adapter because of DCMD failure when this DCMD is not supported
> causes driver's probe getting failed. This issue got introduced because
> of below commit when MFI IO timeout handling was introduced-
>
> 6d40afb megaraid_sas: MFI IO timeout handling
>
> Killing adapter in case of this DCMD failure should be limited to Fusion
> adapters only. Per controller's instance variable allow_fw_scan is removed
> as pd_list_not_supported better reflect the purpose.
>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure
2016-03-10 10:14 [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure Sumit Saxena
2016-03-10 10:40 ` Johannes Thumshirn
@ 2016-03-10 13:06 ` Hannes Reinecke
2016-03-10 15:28 ` Ewan Milne
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Hannes Reinecke @ 2016-03-10 13:06 UTC (permalink / raw)
To: Sumit Saxena, thenzl, jbottomley, martin.petersen, hch
Cc: linux-scsi, kashyap.desai
On 03/10/2016 11:14 AM, Sumit Saxena wrote:
> There are few MFI adapters which do not support MR_DCMD_PD_LIST_QUERY so
> if MFI adapters fail this DCMD, it should not be considered as FATAL and
> driver should not issue kill adapter and set per controller's instance
> variable- pd_list_not_supported so that same variable can be used inside
> functions- slave_alloc and slave_configure to allow firmware scan.
>
> Killing adapter because of DCMD failure when this DCMD is not supported
> causes driver's probe getting failed. This issue got introduced because
> of below commit when MFI IO timeout handling was introduced-
>
> 6d40afb megaraid_sas: MFI IO timeout handling
>
> Killing adapter in case of this DCMD failure should be limited to Fusion
> adapters only. Per controller's instance variable allow_fw_scan is removed
> as pd_list_not_supported better reflect the purpose.
>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> ---
> drivers/scsi/megaraid/megaraid_sas.h | 2 +-
> drivers/scsi/megaraid/megaraid_sas_base.c | 14 ++++++++++----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
Took you a while to figure that one out :-)
This was actually the main issue why I started with the DCMD timeout
stuff.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure
2016-03-10 10:14 [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure Sumit Saxena
2016-03-10 10:40 ` Johannes Thumshirn
2016-03-10 13:06 ` Hannes Reinecke
@ 2016-03-10 15:28 ` Ewan Milne
2016-03-10 21:35 ` Tomas Henzl
2016-03-11 1:29 ` Martin K. Petersen
4 siblings, 0 replies; 6+ messages in thread
From: Ewan Milne @ 2016-03-10 15:28 UTC (permalink / raw)
To: Sumit Saxena
Cc: thenzl, jbottomley, martin.petersen, hch, linux-scsi,
kashyap.desai
On Thu, 2016-03-10 at 02:14 -0800, Sumit Saxena wrote:
> There are few MFI adapters which do not support MR_DCMD_PD_LIST_QUERY so
> if MFI adapters fail this DCMD, it should not be considered as FATAL and
> driver should not issue kill adapter and set per controller's instance
> variable- pd_list_not_supported so that same variable can be used inside
> functions- slave_alloc and slave_configure to allow firmware scan.
>
> Killing adapter because of DCMD failure when this DCMD is not supported
> causes driver's probe getting failed. This issue got introduced because
> of below commit when MFI IO timeout handling was introduced-
>
> 6d40afb megaraid_sas: MFI IO timeout handling
>
> Killing adapter in case of this DCMD failure should be limited to Fusion
> adapters only. Per controller's instance variable allow_fw_scan is removed
> as pd_list_not_supported better reflect the purpose.
>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> ---
> drivers/scsi/megaraid/megaraid_sas.h | 2 +-
> drivers/scsi/megaraid/megaraid_sas_base.c | 14 ++++++++++----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
> index 4484e63..fce414a 100644
> --- a/drivers/scsi/megaraid/megaraid_sas.h
> +++ b/drivers/scsi/megaraid/megaraid_sas.h
> @@ -2097,7 +2097,7 @@ struct megasas_instance {
> u8 UnevenSpanSupport;
>
> u8 supportmax256vd;
> - u8 allow_fw_scan;
> + u8 pd_list_not_supported;
> u16 fw_supported_vd_count;
> u16 fw_supported_pd_count;
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 5c08568..69d375b 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1838,7 +1838,7 @@ static int megasas_slave_configure(struct scsi_device *sdev)
> struct megasas_instance *instance;
>
> instance = megasas_lookup_instance(sdev->host->host_no);
> - if (instance->allow_fw_scan) {
> + if (instance->pd_list_not_supported) {
> if (sdev->channel < MEGASAS_MAX_PD_CHANNELS &&
> sdev->type == TYPE_DISK) {
> pd_index = (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
> @@ -1874,7 +1874,8 @@ static int megasas_slave_alloc(struct scsi_device *sdev)
> pd_index =
> (sdev->channel * MEGASAS_MAX_DEV_PER_CHANNEL) +
> sdev->id;
> - if ((instance->allow_fw_scan || instance->pd_list[pd_index].driveState ==
> + if ((instance->pd_list_not_supported ||
> + instance->pd_list[pd_index].driveState ==
> MR_PD_STATE_SYSTEM)) {
> goto scan_target;
> }
> @@ -4087,7 +4088,13 @@ megasas_get_pd_list(struct megasas_instance *instance)
>
> switch (ret) {
> case DCMD_FAILED:
> - megaraid_sas_kill_hba(instance);
> + dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY "
> + "failed/not supported by firmware\n");
> +
> + if (instance->ctrl_context)
> + megaraid_sas_kill_hba(instance);
> + else
> + instance->pd_list_not_supported = 1;
> break;
> case DCMD_TIMEOUT:
>
> @@ -5034,7 +5041,6 @@ static int megasas_init_fw(struct megasas_instance *instance)
> case PCI_DEVICE_ID_DELL_PERC5:
> default:
> instance->instancet = &megasas_instance_template_xscale;
> - instance->allow_fw_scan = 1;
> break;
> }
>
Note the comment "fixes 6d40afb megaraid_sas: MFI IO timeout handling"
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure
2016-03-10 10:14 [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure Sumit Saxena
` (2 preceding siblings ...)
2016-03-10 15:28 ` Ewan Milne
@ 2016-03-10 21:35 ` Tomas Henzl
2016-03-11 1:29 ` Martin K. Petersen
4 siblings, 0 replies; 6+ messages in thread
From: Tomas Henzl @ 2016-03-10 21:35 UTC (permalink / raw)
To: Sumit Saxena, jbottomley, martin.petersen, hch; +Cc: linux-scsi, kashyap.desai
On 10.3.2016 11:14, Sumit Saxena wrote:
> There are few MFI adapters which do not support MR_DCMD_PD_LIST_QUERY so
> if MFI adapters fail this DCMD, it should not be considered as FATAL and
> driver should not issue kill adapter and set per controller's instance
> variable- pd_list_not_supported so that same variable can be used inside
> functions- slave_alloc and slave_configure to allow firmware scan.
>
> Killing adapter because of DCMD failure when this DCMD is not supported
> causes driver's probe getting failed. This issue got introduced because
> of below commit when MFI IO timeout handling was introduced-
>
> 6d40afb megaraid_sas: MFI IO timeout handling
>
> Killing adapter in case of this DCMD failure should be limited to Fusion
> adapters only. Per controller's instance variable allow_fw_scan is removed
> as pd_list_not_supported better reflect the purpose.
>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure
2016-03-10 10:14 [PATCH] megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure Sumit Saxena
` (3 preceding siblings ...)
2016-03-10 21:35 ` Tomas Henzl
@ 2016-03-11 1:29 ` Martin K. Petersen
4 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2016-03-11 1:29 UTC (permalink / raw)
To: Sumit Saxena
Cc: thenzl, jbottomley, martin.petersen, hch, linux-scsi,
kashyap.desai
>>>>> "Sumit" == Sumit Saxena <sumit.saxena@broadcom.com> writes:
Sumit> There are few MFI adapters which do not support
Sumit> MR_DCMD_PD_LIST_QUERY so if MFI adapters fail this DCMD, it
Sumit> should not be considered as FATAL and driver should not issue
Sumit> kill adapter and set per controller's instance variable-
Sumit> pd_list_not_supported so that same variable can be used inside
Sumit> functions- slave_alloc and slave_configure to allow firmware
Sumit> scan.
Applied to 4.6/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread