diff options
author | James Smart <jsmart2021@gmail.com> | 2017-06-01 21:07:00 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-12 21:37:30 -0400 |
commit | 6599e12428a8b3b182e91818cb7b73ab29e7daff (patch) | |
tree | 861c9618d29a1f725f39e45705637bbd05830486 /drivers/scsi/lpfc | |
parent | 92721c3b97126a712af221635407251e42e58b60 (diff) | |
download | op-kernel-dev-6599e12428a8b3b182e91818cb7b73ab29e7daff.zip op-kernel-dev-6599e12428a8b3b182e91818cb7b73ab29e7daff.tar.gz |
scsi: lpfc: Fix nvmet node ref count handling
When unloading the driver, the NVMET driver would wait the full 30
seconds for its UNMAPPED initiator node to get removed before continuing
with the unload process. NVMEI worked correctly.
For each rport put into UNMAPPED or MAPPED state by NVMET, the driver
puts a reference on the NDLP. The difference is that NVMEI has a
unregister call for its rports and the extra reference is removed in the
unregister process. For NVMET, the driver has to remove the reference
explicitly when dropping out of UNMAPPED or MAPPED because there is no
unregister call.
Add a call to lpfc_nlp_put on the ndlp when NVMET and the old state was
UNMAPPED or MAPPED.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 055fedd..db2d0e6 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -4167,14 +4167,14 @@ lpfc_nlp_state_cleanup(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, lpfc_unregister_remote_port(ndlp); } - /* Notify the NVME transport of this rport's loss on the - * Initiator. For NVME Target, should upcall transport - * in the else clause when API available. - */ if (ndlp->nlp_fc4_type & NLP_FC4_NVME) { vport->phba->nport_event_cnt++; if (vport->phba->nvmet_support == 0) + /* Start devloss */ lpfc_nvme_unregister_port(vport, ndlp); + else + /* NVMET has no upcall. */ + lpfc_nlp_put(ndlp); } } |