Commit b57ab746 authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: Fix vports not logging into target

vports cannot login to target.

For vports, lpfc_nodelist is allocated for targets only on completion of
GFF_ID command. Driver checks if lpfc_nodelist exists for target before
sending GFF_ID. So, GFF_ID and PLOGI are not sent.

As mentioned by the comment in lpfc_prep_node_fc4type() routine, do not
send GFF_ID only if this NPortID is previously identified as FCP
target. Send GFF_ID if it is a newly identified remote port from GID_FT
response.
Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dea37e82
...@@ -503,26 +503,23 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type) ...@@ -503,26 +503,23 @@ lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type)
Did, vport->fc_flag, vport->fc_rscn_id_cnt); Did, vport->fc_flag, vport->fc_rscn_id_cnt);
/* /*
* This NPortID was previously a FCP target, * This NPortID was previously a FCP/NVMe target,
* Don't even bother to send GFF_ID. * Don't even bother to send GFF_ID.
*/ */
ndlp = lpfc_findnode_did(vport, Did); ndlp = lpfc_findnode_did(vport, Did);
if (ndlp && NLP_CHK_NODE_ACT(ndlp)) if (ndlp && NLP_CHK_NODE_ACT(ndlp) &&
ndlp->nlp_fc4_type = fc4_type; (ndlp->nlp_type &
(NLP_FCP_TARGET | NLP_NVME_TARGET))) {
if (ndlp && NLP_CHK_NODE_ACT(ndlp)) { if (fc4_type == FC_TYPE_FCP)
ndlp->nlp_fc4_type = fc4_type; ndlp->nlp_fc4_type |= NLP_FC4_FCP;
if (fc4_type == FC_TYPE_NVME)
if (ndlp->nlp_type & NLP_FCP_TARGET) ndlp->nlp_fc4_type |= NLP_FC4_NVME;
lpfc_setup_disc_node(vport, Did); lpfc_setup_disc_node(vport, Did);
} else if (lpfc_ns_cmd(vport, SLI_CTNS_GFF_ID,
else if (lpfc_ns_cmd(vport, SLI_CTNS_GFF_ID, 0, Did) == 0)
0, Did) == 0) vport->num_disc_nodes++;
vport->num_disc_nodes++; else
lpfc_setup_disc_node(vport, Did);
else
lpfc_setup_disc_node(vport, Did);
}
} else { } else {
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT,
"Skip2 GID_FTrsp: did:x%x flg:x%x cnt:%d", "Skip2 GID_FTrsp: did:x%x flg:x%x cnt:%d",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment