Skip to content

Commit bb33b07

Browse files
Justin Teemartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 17cb5e9 commit bb33b07

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

drivers/scsi/lpfc/lpfc_disc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ enum lpfc_nlp_flag {
208208
NPR list */
209209
NLP_RM_DFLT_RPI = 26, /* need to remove leftover dflt RPI */
210210
NLP_NODEV_REMOVE = 27, /* Defer removal till discovery ends */
211-
NLP_TARGET_REMOVE = 28, /* Target remove in process */
212211
NLP_SC_REQ = 29, /* Target requires authentication */
213212
NLP_FIRSTBURST = 30, /* Target supports FirstBurst */
214213
NLP_RPI_REGISTERED = 31 /* nlp_rpi is valid */

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3035,19 +3035,6 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
30353035
/* Call state machine. This will unregister the rpi if needed. */
30363036
lpfc_disc_state_machine(vport, ndlp, cmdiocb, NLP_EVT_CMPL_LOGO);
30373037

3038-
if (skip_recovery)
3039-
goto out;
3040-
3041-
/* The driver sets this flag for an NPIV instance that doesn't want to
3042-
* log into the remote port.
3043-
*/
3044-
if (test_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag)) {
3045-
clear_bit(NLP_NPR_2B_DISC, &ndlp->nlp_flag);
3046-
lpfc_disc_state_machine(vport, ndlp, cmdiocb,
3047-
NLP_EVT_DEVICE_RM);
3048-
goto out_rsrc_free;
3049-
}
3050-
30513038
out:
30523039
/* At this point, the LOGO processing is complete. NOTE: For a
30533040
* 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,
30913078
lpfc_disc_state_machine(vport, ndlp, cmdiocb,
30923079
NLP_EVT_DEVICE_RM);
30933080
}
3094-
out_rsrc_free:
3081+
30953082
/* Driver is done with the I/O. */
30963083
lpfc_els_free_iocb(phba, cmdiocb);
30973084
lpfc_nlp_put(ndlp);
@@ -10411,8 +10398,6 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
1041110398
}
1041210399
}
1041310400

10414-
clear_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag);
10415-
1041610401
lpfc_disc_state_machine(vport, ndlp, elsiocb,
1041710402
NLP_EVT_RCV_PLOGI);
1041810403

drivers/scsi/lpfc/lpfc_nportdisc.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,11 +2255,13 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
22552255
(vport->port_type == LPFC_NPIV_PORT) &&
22562256
vport->cfg_restrict_login) {
22572257
out:
2258-
set_bit(NLP_TARGET_REMOVE, &ndlp->nlp_flag);
2258+
lpfc_printf_vlog(vport, KERN_INFO,
2259+
LOG_ELS | LOG_DISCOVERY | LOG_NODE,
2260+
"6228 Sending LOGO, determined nlp_type "
2261+
"0x%x nlp_flag x%lx refcnt %u\n",
2262+
ndlp->nlp_type, ndlp->nlp_flag,
2263+
kref_read(&ndlp->kref));
22592264
lpfc_issue_els_logo(vport, ndlp, 0);
2260-
2261-
ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE;
2262-
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
22632265
return ndlp->nlp_state;
22642266
}
22652267

0 commit comments

Comments
 (0)