summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2017-11-21 01:00:37 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-12-05 02:32:54 +0100
commitb7e50c536e8e4c6d4c74a1d54a0ce33edbf9dd0a (patch)
treebc9510e09dc21aa5be3b87af27e6362346ecca21
parentscsi: lpfc: Adjust default value of lpfc_nvmet_mrq (diff)
downloadlinux-b7e50c536e8e4c6d4c74a1d54a0ce33edbf9dd0a.tar.xz
linux-b7e50c536e8e4c6d4c74a1d54a0ce33edbf9dd0a.zip
scsi: lpfc: Fix ndlp ref count for pt2pt mode issue RSCN
pt2pt ndlp ref count prematurely goes to 0. There was reference removed that should only be removed if connected to a switch, not if in point-to-point mode. Add a mode check before the reference remove. 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>
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 1b6a1738b3d5..95733981828d 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -2956,8 +2956,8 @@ lpfc_issue_els_scr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
/* This will cause the callback-function lpfc_cmpl_els_cmd to
* trigger the release of node.
*/
-
- lpfc_nlp_put(ndlp);
+ if (!(vport->fc_flag & FC_PT2PT))
+ lpfc_nlp_put(ndlp);
return 0;
}