All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc
@ 2019-10-21 10:05 Daniel Wagner
  2019-10-21 10:10 ` Hannes Reinecke
  2019-10-21 20:05 ` James Smart
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Wagner @ 2019-10-21 10:05 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel, Daniel Wagner, James Smart, Alex Iannicelli

The initial lpfc_desc_set_adisc implementation dea3101e0a5c ("lpfc:
add Emulex FC driver version 8.0.28") enabled ADISC if

	cfg_use_adisc && RSCN_MODE && FCP_2_DEVICE

In commit 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of
SLI-3") this changed to

	(cfg_use_adisc && RSC_MODE) || FCP_2_DEVICE

and later in ffc954936b13 ("[SCSI] lpfc 8.3.13: FC Discovery Fixes and
enhancements.") to

	(cfg_use_adisc && RSC_MODE) || (FCP_2_DEVICe && FCP_TARGET)

A customer reports that after a Devlos, an ADISC failure is logged. It
turns out the ADISC flag is set even the user explicitly set
lpfc_use_adisc = 0.

[Sat Dec 22 22:55:58 2018] lpfc 0000:82:00.0: 2:(0):0203 Devloss timeout on WWPN 50:01:43:80:12:8e:40:20 NPort x05df00 Data: x82000000 x8 xa
[Sat Dec 22 23:08:20 2018] lpfc 0000:82:00.0: 2:(0):2755 ADISC failure DID:05DF00 Status:x9/x70000

Fixes: 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of SLI-3")
Cc: James Smart <James.Smart@emulex.com>
Cc: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
Hi,

Unfortunatly, I don't really know all the procotols involved. So this
is just a rough guess what is wrong. 

Thanks,
Daniel

 drivers/scsi/lpfc/lpfc_nportdisc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index cc6b1b0bae83..d27ae84326df 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -940,9 +940,9 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
 
 	if (!(vport->fc_flag & FC_PT2PT)) {
 		/* Check config parameter use-adisc or FCP-2 */
-		if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) ||
+		if (vport->cfg_use_adisc && ((vport->fc_flag & FC_RSCN_MODE) ||
 		    ((ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) &&
-		     (ndlp->nlp_type & NLP_FCP_TARGET))) {
+		     (ndlp->nlp_type & NLP_FCP_TARGET)))) {
 			spin_lock_irq(shost->host_lock);
 			ndlp->nlp_flag |= NLP_NPR_ADISC;
 			spin_unlock_irq(shost->host_lock);
-- 
2.16.4


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

* Re: [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc
  2019-10-21 10:05 [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc Daniel Wagner
@ 2019-10-21 10:10 ` Hannes Reinecke
  2019-10-21 20:05 ` James Smart
  1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2019-10-21 10:10 UTC (permalink / raw)
  To: Daniel Wagner, linux-scsi; +Cc: linux-kernel, James Smart, Alex Iannicelli

On 10/21/19 12:05 PM, Daniel Wagner wrote:
> The initial lpfc_desc_set_adisc implementation dea3101e0a5c ("lpfc:
> add Emulex FC driver version 8.0.28") enabled ADISC if
> 
> 	cfg_use_adisc && RSCN_MODE && FCP_2_DEVICE
> 
> In commit 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of
> SLI-3") this changed to
> 
> 	(cfg_use_adisc && RSC_MODE) || FCP_2_DEVICE
> 
> and later in ffc954936b13 ("[SCSI] lpfc 8.3.13: FC Discovery Fixes and
> enhancements.") to
> 
> 	(cfg_use_adisc && RSC_MODE) || (FCP_2_DEVICe && FCP_TARGET)
> 
> A customer reports that after a Devlos, an ADISC failure is logged. It
> turns out the ADISC flag is set even the user explicitly set
> lpfc_use_adisc = 0.
> 
> [Sat Dec 22 22:55:58 2018] lpfc 0000:82:00.0: 2:(0):0203 Devloss timeout on WWPN 50:01:43:80:12:8e:40:20 NPort x05df00 Data: x82000000 x8 xa
> [Sat Dec 22 23:08:20 2018] lpfc 0000:82:00.0: 2:(0):2755 ADISC failure DID:05DF00 Status:x9/x70000
> 
> Fixes: 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of SLI-3")
> Cc: James Smart <James.Smart@emulex.com>
> Cc: Alex Iannicelli <alex.iannicelli@emulex.com>
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
> Hi,
> 
> Unfortunatly, I don't really know all the procotols involved. So this
> is just a rough guess what is wrong. 
> 
> Thanks,
> Daniel
> 
>  drivers/scsi/lpfc/lpfc_nportdisc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
> index cc6b1b0bae83..d27ae84326df 100644
> --- a/drivers/scsi/lpfc/lpfc_nportdisc.c
> +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
> @@ -940,9 +940,9 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
>  
>  	if (!(vport->fc_flag & FC_PT2PT)) {
>  		/* Check config parameter use-adisc or FCP-2 */
> -		if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) ||
> +		if (vport->cfg_use_adisc && ((vport->fc_flag & FC_RSCN_MODE) ||
>  		    ((ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) &&
> -		     (ndlp->nlp_type & NLP_FCP_TARGET))) {
> +		     (ndlp->nlp_type & NLP_FCP_TARGET)))) {
>  			spin_lock_irq(shost->host_lock);
>  			ndlp->nlp_flag |= NLP_NPR_ADISC;
>  			spin_unlock_irq(shost->host_lock);
> 
Looks reasonable.

Reviewed-by: Hannes Reinecke <hare@sused.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      Teamlead Storage & Networking
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer

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

* Re: [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc
  2019-10-21 10:05 [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc Daniel Wagner
  2019-10-21 10:10 ` Hannes Reinecke
@ 2019-10-21 20:05 ` James Smart
  1 sibling, 0 replies; 3+ messages in thread
From: James Smart @ 2019-10-21 20:05 UTC (permalink / raw)
  To: Daniel Wagner, linux-scsi; +Cc: linux-kernel, James Smart, Dick Kennedy

On 10/21/2019 3:05 AM, Daniel Wagner wrote:
> The initial lpfc_desc_set_adisc implementation dea3101e0a5c ("lpfc:
> add Emulex FC driver version 8.0.28") enabled ADISC if
>
> 	cfg_use_adisc && RSCN_MODE && FCP_2_DEVICE
>
> In commit 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of
> SLI-3") this changed to
>
> 	(cfg_use_adisc && RSC_MODE) || FCP_2_DEVICE
>
> and later in ffc954936b13 ("[SCSI] lpfc 8.3.13: FC Discovery Fixes and
> enhancements.") to
>
> 	(cfg_use_adisc && RSC_MODE) || (FCP_2_DEVICe && FCP_TARGET)
>
> A customer reports that after a Devlos, an ADISC failure is logged. It
> turns out the ADISC flag is set even the user explicitly set
> lpfc_use_adisc = 0.
>
> [Sat Dec 22 22:55:58 2018] lpfc 0000:82:00.0: 2:(0):0203 Devloss timeout on WWPN 50:01:43:80:12:8e:40:20 NPort x05df00 Data: x82000000 x8 xa
> [Sat Dec 22 23:08:20 2018] lpfc 0000:82:00.0: 2:(0):2755 ADISC failure DID:05DF00 Status:x9/x70000
>
> Fixes: 92d7f7b0cde3 ("[SCSI] lpfc: NPIV: add NPIV support on top of SLI-3")
> Cc: James Smart <James.Smart@emulex.com>
> Cc: Alex Iannicelli <alex.iannicelli@emulex.com>
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
> Hi,
>
> Unfortunatly, I don't really know all the procotols involved. So this
> is just a rough guess what is wrong.
>
> Thanks,
> Daniel
>
>   drivers/scsi/lpfc/lpfc_nportdisc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
> index cc6b1b0bae83..d27ae84326df 100644
> --- a/drivers/scsi/lpfc/lpfc_nportdisc.c
> +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
> @@ -940,9 +940,9 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
>   
>   	if (!(vport->fc_flag & FC_PT2PT)) {
>   		/* Check config parameter use-adisc or FCP-2 */
> -		if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) ||
> +		if (vport->cfg_use_adisc && ((vport->fc_flag & FC_RSCN_MODE) ||
>   		    ((ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) &&
> -		     (ndlp->nlp_type & NLP_FCP_TARGET))) {
> +		     (ndlp->nlp_type & NLP_FCP_TARGET)))) {
>   			spin_lock_irq(shost->host_lock);
>   			ndlp->nlp_flag |= NLP_NPR_ADISC;
>   			spin_unlock_irq(shost->host_lock);

Looks good.

Reviewed-by: James Smart <james.smart@broadcom.com>

Thank You

-- james


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

end of thread, other threads:[~2019-10-21 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 10:05 [PATCH] scsi: lpfc: Honor module parameter lpfc_use_adisc Daniel Wagner
2019-10-21 10:10 ` Hannes Reinecke
2019-10-21 20:05 ` James Smart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.