scsi: scsi_transport_fc: nvme: display FC-NVMe port roles
Currently the FC-NVMe driver is leverating the SCSI FC transport class to access the remote ports. Which means that all FC-NVMe remote ports will be visible to the fc transport layer, but due to missing definitions the port roles will always be 'unknown'. This patch adds the missing definitions to the fc transport class to that the port roles are correctly displayed. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: James Smart <james.smart@broadcom.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Giridhar Malavali <gmalavali@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
ea63e60f7a
commit
a6a6d0589a
@@ -4146,9 +4146,15 @@ lpfc_register_remote_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
|
||||
rdata->pnode = lpfc_nlp_get(ndlp);
|
||||
|
||||
if (ndlp->nlp_type & NLP_FCP_TARGET)
|
||||
rport_ids.roles |= FC_RPORT_ROLE_FCP_TARGET;
|
||||
rport_ids.roles |= FC_PORT_ROLE_FCP_TARGET;
|
||||
if (ndlp->nlp_type & NLP_FCP_INITIATOR)
|
||||
rport_ids.roles |= FC_RPORT_ROLE_FCP_INITIATOR;
|
||||
rport_ids.roles |= FC_PORT_ROLE_FCP_INITIATOR;
|
||||
if (ndlp->nlp_type & NLP_NVME_INITIATOR)
|
||||
rport_ids.roles |= FC_PORT_ROLE_NVME_INITIATOR;
|
||||
if (ndlp->nlp_type & NLP_NVME_TARGET)
|
||||
rport_ids.roles |= FC_PORT_ROLE_NVME_TARGET;
|
||||
if (ndlp->nlp_type & NLP_NVME_DISCOVERY)
|
||||
rport_ids.roles |= FC_PORT_ROLE_NVME_DISCOVERY;
|
||||
|
||||
if (rport_ids.roles != FC_RPORT_ROLE_UNKNOWN)
|
||||
fc_remote_port_rolechg(rport, rport_ids.roles);
|
||||
|
Reference in New Issue
Block a user