mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-09 11:11:13 -04:00
scsi: lpfc: Delete NLP_TARGET_REMOVE flag due to obsolete usage
Remove the NLP_TARGET_REMOVE flag as its usage is obsolete. The current framework is to rely on the lpfc_dev_loss_tmo_callbk from upper layer to notify final ndlp kref release. There's no need to specifically set NLP_EVT_DEVICE_RM when a LOGO completes. The dev_loss_tmo_callbk is responsible for the final kref put. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20241212233309.71356-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
17cb5e986e
commit
bb33b07ac6
@@ -208,7 +208,6 @@ enum lpfc_nlp_flag {
|
||||
NPR list */
|
||||
NLP_RM_DFLT_RPI = 26, /* need to remove leftover dflt RPI */
|
||||
NLP_NODEV_REMOVE = 27, /* Defer removal till discovery ends */
|
||||
NLP_TARGET_REMOVE = 28, /* Target remove in process */
|
||||
NLP_SC_REQ = 29, /* Target requires authentication */
|
||||
NLP_FIRSTBURST = 30, /* Target supports FirstBurst */
|
||||
NLP_RPI_REGISTERED = 31 /* nlp_rpi is valid */
|
||||
|
||||
@@ -3035,19 +3035,6 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
/* Call state machine. This will unregister the rpi if needed. */
|
||||
lpfc_disc_state_machine(vport, ndlp, cmdiocb, NLP_EVT_CMPL_LOGO);
|
||||
|
||||
if (skip_recovery)
|
||||
goto out;
|
||||
|
||||
/* The driver sets this flag for an NPIV instance that doesn't want to
|
||||
* log into the remote port.
|
||||
*/
|
||||
if (test_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag)) {
|
||||
clear_bit(NLP_NPR_2B_DISC, &ndlp->nlp_flag);
|
||||
lpfc_disc_state_machine(vport, ndlp, cmdiocb,
|
||||
NLP_EVT_DEVICE_RM);
|
||||
goto out_rsrc_free;
|
||||
}
|
||||
|
||||
out:
|
||||
/* At this point, the LOGO processing is complete. NOTE: For a
|
||||
* pt2pt topology, we are assuming the NPortID will only change
|
||||
@@ -3091,7 +3078,7 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
lpfc_disc_state_machine(vport, ndlp, cmdiocb,
|
||||
NLP_EVT_DEVICE_RM);
|
||||
}
|
||||
out_rsrc_free:
|
||||
|
||||
/* Driver is done with the I/O. */
|
||||
lpfc_els_free_iocb(phba, cmdiocb);
|
||||
lpfc_nlp_put(ndlp);
|
||||
@@ -10411,8 +10398,6 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||
}
|
||||
}
|
||||
|
||||
clear_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag);
|
||||
|
||||
lpfc_disc_state_machine(vport, ndlp, elsiocb,
|
||||
NLP_EVT_RCV_PLOGI);
|
||||
|
||||
|
||||
@@ -2255,11 +2255,13 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
(vport->port_type == LPFC_NPIV_PORT) &&
|
||||
vport->cfg_restrict_login) {
|
||||
out:
|
||||
set_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag);
|
||||
lpfc_printf_vlog(vport, KERN_INFO,
|
||||
LOG_ELS | LOG_DISCOVERY | LOG_NODE,
|
||||
"6228 Sending LOGO, determined nlp_type "
|
||||
"0x%x nlp_flag x%lx refcnt %u\n",
|
||||
ndlp->nlp_type, ndlp->nlp_flag,
|
||||
kref_read(&ndlp->kref));
|
||||
lpfc_issue_els_logo(vport, ndlp, 0);
|
||||
|
||||
ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE;
|
||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
|
||||
return ndlp->nlp_state;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user