]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
scsi: lpfc: Fix ndlp ref count for pt2pt mode issue RSCN
authorJames Smart <jsmart2021@gmail.com>
Tue, 21 Nov 2017 00:00:37 +0000 (16:00 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Mar 2018 04:28:13 +0000 (20:28 -0800)
Orabug: 27631736

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>
(cherry picked from commit b7e50c536e8e4c6d4c74a1d54a0ce33edbf9dd0a)
Signed-off-by: Dick dkennedy <dick.kennedy@broadcom.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/scsi/lpfc/lpfc_els.c

index 064925b918df3bd100ae2776151d19a4e78b973a..465a7a592344e425cc5dcec4ff67498e1da575f8 100644 (file)
@@ -2804,8 +2804,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;
 }