summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_nportdisc.c
diff options
context:
space:
mode:
authorDick Kennedy2017-08-24 01:55:31 +0200
committerMartin K. Petersen2017-08-25 04:29:35 +0200
commit2877cbffb79ed121a6bcc5edbe629d3aba36cd29 (patch)
treebe16f49df0a39b9d218c5425422a8609e8614568 /drivers/scsi/lpfc/lpfc_nportdisc.c
parentscsi: lpfc: Fix plogi collision that causes illegal state transition (diff)
downloadkernel-qcow2-linux-2877cbffb79ed121a6bcc5edbe629d3aba36cd29.tar.gz
kernel-qcow2-linux-2877cbffb79ed121a6bcc5edbe629d3aba36cd29.tar.xz
kernel-qcow2-linux-2877cbffb79ed121a6bcc5edbe629d3aba36cd29.zip
scsi: lpfc: Fix loop mode target discovery
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 <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nportdisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_nportdisc.c3
1 files changed, 3 insertions, 0 deletions
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);