diff options
author | James Smart <jsmart2021@gmail.com> | 2017-02-12 13:52:32 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-02-22 18:41:43 -0500 |
commit | 01649561a8b4b77247bd234f240d737367bb8a52 (patch) | |
tree | a37a5b805516a422edf898463d395a87ecc50d2a /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | a0f2d3ef374fd8d2f51b8cc1ea723014b1aa2c9b (diff) | |
download | linux-01649561a8b4b77247bd234f240d737367bb8a52.tar.gz linux-01649561a8b4b77247bd234f240d737367bb8a52.tar.bz2 linux-01649561a8b4b77247bd234f240d737367bb8a52.zip |
scsi: lpfc: NVME Initiator: bind to nvme_fc api
NVME Initiator: Tie in to NVME Fabrics nvme_fc LLDD initiator api
Adds the routines to:
- register and deregister the FC port as a nvme-fc initiator localport
- register and deregister remote FC ports as a nvme-fc remoteport
- binding of nvme queues to adapter WQs
- send/perform NVME LS's
- send/perform NVME FCP initiator io operations
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 6e64c8e8e44f..8936f5d91c87 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -909,7 +909,9 @@ lpfc_linkdown(struct lpfc_hba *phba) vports[i]->fc_myDID = 0; - /* todo: init: revise localport nvme attributes */ + if ((phba->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) || + (phba->cfg_enable_fc4_type == LPFC_ENABLE_NVME)) + lpfc_nvme_update_localport(vports[i]); } } lpfc_destroy_vport_work_array(phba, vports); @@ -3580,7 +3582,9 @@ lpfc_mbx_cmpl_reg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) spin_unlock_irq(shost->host_lock); vport->fc_myDID = 0; - /* todo: init: revise localport nvme attributes */ + if ((phba->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) || + (phba->cfg_enable_fc4_type == LPFC_ENABLE_NVME)) + lpfc_nvme_update_localport(vport); goto out; } @@ -3950,7 +3954,8 @@ out: if ((phba->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) || (phba->cfg_enable_fc4_type == LPFC_ENABLE_NVME)) - lpfc_ns_cmd(vport, SLI_CTNS_RFF_ID, 0, FC_TYPE_NVME); + lpfc_ns_cmd(vport, SLI_CTNS_RFF_ID, 0, + FC_TYPE_NVME); /* Issue SCR just before NameServer GID_FT Query */ lpfc_issue_els_scr(vport, SCR_DID, 0); @@ -4144,7 +4149,7 @@ lpfc_nlp_state_cleanup(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, ((ndlp->nlp_fc4_type & NLP_FC4_NVME) || (ndlp->nlp_DID == Fabric_DID))) { vport->phba->nport_event_cnt++; - /* todo: init: unregister rport from nvme */ + lpfc_nvme_unregister_port(vport, ndlp); } } @@ -4169,7 +4174,7 @@ lpfc_nlp_state_cleanup(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, * the register. */ vport->phba->nport_event_cnt++; - /* todo: init: register rport with nvme */ + lpfc_nvme_register_port(vport, ndlp); } } } |