linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not fire MR_DCMD_PD_LIST_QUERY to controllers which do not support it
@ 2016-07-08 10:20 Sumit Saxena
  2016-07-08 10:30 ` Sumit Saxena
  0 siblings, 1 reply; 2+ messages in thread
From: Sumit Saxena @ 2016-07-08 10:20 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen
  Cc: linux-scsi, kashyap.desai, lucz, stable, Sumit Saxena

There was an issue reported by Lucz Geza on Dell Perc 6i. As per issue reported,
driver goes into an infinite error reporting loop as soon as there is a change
in the status of one of the arrays (degrade, resync online etc …).
Below are the error logs reported continuously- 

Jun 25 08:49:30 ns8 kernel: [  757.757017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [  757.778017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [  757.799017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [  757.820018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115
Jun 25 08:49:30 ns8 kernel: [  757.841018] megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware: megasas_get_pd_list 4115

This issue is very much specific to controllers which do not support DCMD- MR_DCMD_PD_LIST_QUERY.
In case of any hotplugging/rescanning of drives, AEN thread will be scheduled by driver and fire
DCMD- MR_DCMD_PD_LIST_QUERY and if this DCMD is failed then driver will fail this event processing
and will not go ahead for further events. This will cause infinite loop of same event getting
retried infinitely and causing above mentioned logs.

Fix for this problem is: not to fire DCMD MR_DCMD_PD_LIST_QUERY for controllers which do not
support it and send DCMD SUCCESS status to AEN function so that it can go ahead with other event
processing.

Reported-by: Lucz Geza <geza@lucz.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>

---
 drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f4b0690..2dab3dc 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4079,6 +4079,12 @@ megasas_get_pd_list(struct megasas_instance *instance)
 	struct MR_PD_ADDRESS *pd_addr;
 	dma_addr_t ci_h = 0;
 
+	if (instance->pd_list_not_supported) {
+		dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY "
+		"not supported by firmware\n");
+		return ret;
+	}
+
 	cmd = megasas_get_cmd(instance);
 
 	if (!cmd) {
-- 
2.4.11

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] Do not fire MR_DCMD_PD_LIST_QUERY to controllers which do not support it
  2016-07-08 10:20 [PATCH] Do not fire MR_DCMD_PD_LIST_QUERY to controllers which do not support it Sumit Saxena
@ 2016-07-08 10:30 ` Sumit Saxena
  0 siblings, 0 replies; 2+ messages in thread
From: Sumit Saxena @ 2016-07-08 10:30 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen; +Cc: linux-scsi, Kashyap Desai, lucz, stable

Please ignore this patch. I missed to add megaraid_sas in subject line. I
realized after sending. Will be resending with proper subject. Sorry for
spamming.

> -----Original Message-----
> From: Sumit Saxena [mailto:sumit.saxena@broadcom.com]
> Sent: Friday, July 08, 2016 3:51 PM
> To: James.Bottomley@HansenPartnership.com; martin.petersen@oracle.com
> Cc: linux-scsi@vger.kernel.org; kashyap.desai@broadcom.com;
> lucz@geza.com; stable@vger.kernel.org; Sumit Saxena
> Subject: [PATCH] Do not fire MR_DCMD_PD_LIST_QUERY to controllers which
> do not support it
>
> There was an issue reported by Lucz Geza on Dell Perc 6i. As per issue
> reported,
> driver goes into an infinite error reporting loop as soon as there is a
> change in
> the status of one of the arrays (degrade, resync online etc …).
> Below are the error logs reported continuously-
>
> Jun 25 08:49:30 ns8 kernel: [  757.757017] megaraid_sas 0000:02:00.0: DCMD
> failed/not supported by firmware: megasas_get_pd_list 4115 Jun 25 08:49:30
> ns8 kernel: [  757.778017] megaraid_sas 0000:02:00.0: DCMD failed/not
> supported by firmware: megasas_get_pd_list 4115 Jun 25 08:49:30 ns8
> kernel: [
> 757.799017] megaraid_sas 0000:02:00.0: DCMD failed/not supported by
> firmware: megasas_get_pd_list 4115 Jun 25 08:49:30 ns8 kernel: [
> 757.820018]
> megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware:
> megasas_get_pd_list 4115 Jun 25 08:49:30 ns8 kernel: [  757.841018]
> megaraid_sas 0000:02:00.0: DCMD failed/not supported by firmware:
> megasas_get_pd_list 4115
>
> This issue is very much specific to controllers which do not support DCMD-
> MR_DCMD_PD_LIST_QUERY.
> In case of any hotplugging/rescanning of drives, AEN thread will be
> scheduled by
> driver and fire
> DCMD- MR_DCMD_PD_LIST_QUERY and if this DCMD is failed then driver will
> fail this event processing and will not go ahead for further events. This
> will cause
> infinite loop of same event getting retried infinitely and causing above
> mentioned logs.
>
> Fix for this problem is: not to fire DCMD MR_DCMD_PD_LIST_QUERY for
> controllers which do not support it and send DCMD SUCCESS status to AEN
> function so that it can go ahead with other event processing.
>
> Reported-by: Lucz Geza <geza@lucz.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
>
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index f4b0690..2dab3dc 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -4079,6 +4079,12 @@ megasas_get_pd_list(struct megasas_instance
> *instance)
>  	struct MR_PD_ADDRESS *pd_addr;
>  	dma_addr_t ci_h = 0;
>
> +	if (instance->pd_list_not_supported) {
> +		dev_info(&instance->pdev->dev, "MR_DCMD_PD_LIST_QUERY
> "
> +		"not supported by firmware\n");
> +		return ret;
> +	}
> +
>  	cmd = megasas_get_cmd(instance);
>
>  	if (!cmd) {
> --
> 2.4.11

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-08 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-08 10:20 [PATCH] Do not fire MR_DCMD_PD_LIST_QUERY to controllers which do not support it Sumit Saxena
2016-07-08 10:30 ` Sumit Saxena

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).