Skip to content

Commit a4809b9

Browse files
Justin Teemartinkpetersen
authored andcommitted
scsi: lpfc: Remove ndlp kref decrement clause for F_Port_Ctrl in lpfc_cleanup
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>
1 parent 803dfd8 commit a4809b9

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12008,7 +12008,11 @@ lpfc_sli4_els_xri_aborted(struct lpfc_hba *phba,
1200812008
sglq_entry->state = SGL_FREED;
1200912009
spin_unlock_irqrestore(&phba->sli4_hba.sgl_list_lock,
1201012010
iflag);
12011-
12011+
lpfc_printf_log(phba, KERN_INFO, LOG_ELS | LOG_SLI |
12012+
LOG_DISCOVERY | LOG_NODE,
12013+
"0732 ELS XRI ABORT on Node: ndlp=x%px "
12014+
"xri=x%x\n",
12015+
ndlp, xri);
1201212016
if (ndlp) {
1201312017
lpfc_set_rrq_active(phba, ndlp,
1201412018
sglq_entry->sli4_lxritag,

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3057,13 +3057,6 @@ lpfc_cleanup(struct lpfc_vport *vport)
30573057
lpfc_vmid_vport_cleanup(vport);
30583058

30593059
list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
3060-
if (vport->port_type != LPFC_PHYSICAL_PORT &&
3061-
ndlp->nlp_DID == Fabric_DID) {
3062-
/* Just free up ndlp with Fabric_DID for vports */
3063-
lpfc_nlp_put(ndlp);
3064-
continue;
3065-
}
3066-
30673060
if (ndlp->nlp_DID == Fabric_Cntl_DID &&
30683061
ndlp->nlp_state == NLP_STE_UNUSED_NODE) {
30693062
lpfc_nlp_put(ndlp);

0 commit comments

Comments
 (0)