]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: lpfc: Remove ndlp kref decrement clause for F_Port_Ctrl in lpfc_cleanup
authorJustin Tee <justin.tee@broadcom.com>
Mon, 15 Sep 2025 18:08:01 +0000 (11:08 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Sep 2025 02:19:59 +0000 (22:19 -0400)
In lpfc_cleanup, there is an extraneous nlp_put for NPIV ports on the
F_Port_Ctrl ndlp object.  In cases when an ABTS is issued, the
outstanding kref is needed for when a second XRI_ABORTED CQE is
received.  The final kref for the ndlp is designed to be decremented in
lpfc_sli4_els_xri_aborted instead.  Also, add a new log message to allow
for future diagnostics when debugging related issues.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Message-ID: <20250915180811.137530-5-justintee8345@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c

index fca81e0c7c2e1a3cf6be4db6941fe2d8e0c28439..db6a6bbd00316561129e4845e56d674293baf0f0 100644 (file)
@@ -12008,7 +12008,11 @@ lpfc_sli4_els_xri_aborted(struct lpfc_hba *phba,
                        sglq_entry->state = SGL_FREED;
                        spin_unlock_irqrestore(&phba->sli4_hba.sgl_list_lock,
                                               iflag);
-
+                       lpfc_printf_log(phba, KERN_INFO, LOG_ELS | LOG_SLI |
+                                       LOG_DISCOVERY | LOG_NODE,
+                                       "0732 ELS XRI ABORT on Node: ndlp=x%px "
+                                       "xri=x%x\n",
+                                       ndlp, xri);
                        if (ndlp) {
                                lpfc_set_rrq_active(phba, ndlp,
                                        sglq_entry->sli4_lxritag,
index 4081d2a358eee8fe22b4b2356d789adedd1b490c..f7824266db5e814cb4a55e43a1c6ae493d6cfade 100644 (file)
@@ -3057,13 +3057,6 @@ lpfc_cleanup(struct lpfc_vport *vport)
                lpfc_vmid_vport_cleanup(vport);
 
        list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
-               if (vport->port_type != LPFC_PHYSICAL_PORT &&
-                   ndlp->nlp_DID == Fabric_DID) {
-                       /* Just free up ndlp with Fabric_DID for vports */
-                       lpfc_nlp_put(ndlp);
-                       continue;
-               }
-
                if (ndlp->nlp_DID == Fabric_Cntl_DID &&
                    ndlp->nlp_state == NLP_STE_UNUSED_NODE) {
                        lpfc_nlp_put(ndlp);