From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Smart Subject: [PATCH v2 02/20] lpfc: Fix loop mode target discovery Date: Fri, 4 Aug 2017 17:47:13 -0700 Message-ID: <20170805004731.1335-3-jsmart2021@gmail.com> References: <20170805004731.1335-1-jsmart2021@gmail.com> Return-path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:33876 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752542AbdHEAro (ORCPT ); Fri, 4 Aug 2017 20:47:44 -0400 Received: by mail-pf0-f194.google.com with SMTP id t86so3207462pfe.1 for ; Fri, 04 Aug 2017 17:47:44 -0700 (PDT) In-Reply-To: <20170805004731.1335-1-jsmart2021@gmail.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: linux-scsi@vger.kernel.org Cc: jsmart2021@gmail.com, Dick Kennedy , James Smart From: Dick Kennedy The driver does not discover targets when in loop mode. The NLP type is correctly getting set when a fabric connection is detected but, not for loop. The unknown NLP type means that the driver does not issue a PRLI when in loop topology. Thus target discovery fails. Fix by checking the topology during discovery. If it is loop, set the NLP FC4 type to FCP. Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_nportdisc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index f74cb0142fd4..95b2b43ac37d 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -1724,6 +1724,9 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, lpfc_nvme_update_localport(vport); } + } else if (phba->fc_topology == LPFC_TOPOLOGY_LOOP) { + ndlp->nlp_fc4_type |= NLP_FC4_FCP; + } else if (ndlp->nlp_fc4_type == 0) { rc = lpfc_ns_cmd(vport, SLI_CTNS_GFT_ID, 0, ndlp->nlp_DID); -- 2.13.1