Lines Matching refs:ndlp

986 	struct lpfc_nodelist *ndlp = NULL;  in lpfc_clr_rrq_active()  local
990 ndlp = lpfc_findnode_did(rrq->vport, rrq->nlp_DID); in lpfc_clr_rrq_active()
992 if (!ndlp) in lpfc_clr_rrq_active()
995 if (test_and_clear_bit(xritag, ndlp->active_rrqs_xri_bitmap)) { in lpfc_clr_rrq_active()
1097 lpfc_cleanup_vports_rrqs(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) in lpfc_cleanup_vports_rrqs() argument
1108 if (!ndlp) { in lpfc_cleanup_vports_rrqs()
1117 if (!ndlp || ndlp == lpfc_findnode_did(vport, rrq->nlp_DID)) in lpfc_cleanup_vports_rrqs()
1140 lpfc_test_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, in lpfc_test_rrq_active() argument
1143 if (!ndlp) in lpfc_test_rrq_active()
1145 if (!ndlp->active_rrqs_xri_bitmap) in lpfc_test_rrq_active()
1147 if (test_bit(xritag, ndlp->active_rrqs_xri_bitmap)) in lpfc_test_rrq_active()
1169 lpfc_set_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, in lpfc_set_rrq_active() argument
1176 if (!ndlp) in lpfc_set_rrq_active()
1188 if (ndlp->vport && (ndlp->vport->load_flag & FC_UNLOADING)) in lpfc_set_rrq_active()
1191 if (!ndlp->active_rrqs_xri_bitmap) in lpfc_set_rrq_active()
1194 if (test_and_set_bit(xritag, ndlp->active_rrqs_xri_bitmap)) in lpfc_set_rrq_active()
1203 xritag, rxid, ndlp->nlp_DID, send_rrq); in lpfc_set_rrq_active()
1213 rrq->nlp_DID = ndlp->nlp_DID; in lpfc_set_rrq_active()
1214 rrq->vport = ndlp->vport; in lpfc_set_rrq_active()
1229 xritag, rxid, ndlp->nlp_DID, send_rrq); in lpfc_set_rrq_active()
1251 struct lpfc_nodelist *ndlp; in __lpfc_sli_get_els_sglq() local
1259 ndlp = lpfc_cmd->rdata->pnode; in __lpfc_sli_get_els_sglq()
1262 ndlp = piocbq->ndlp; in __lpfc_sli_get_els_sglq()
1265 ndlp = NULL; in __lpfc_sli_get_els_sglq()
1267 ndlp = piocbq->ndlp; in __lpfc_sli_get_els_sglq()
1269 ndlp = piocbq->ndlp; in __lpfc_sli_get_els_sglq()
1278 if (ndlp && ndlp->active_rrqs_xri_bitmap && in __lpfc_sli_get_els_sglq()
1280 ndlp->active_rrqs_xri_bitmap)) { in __lpfc_sli_get_els_sglq()
1295 sglq->ndlp = ndlp; in __lpfc_sli_get_els_sglq()
1390 sglq->ndlp = NULL; in __lpfc_sli_release_iocbq_s4()
1405 if (sglq->ndlp && !lpfc_nlp_get(sglq->ndlp)) in __lpfc_sli_release_iocbq_s4()
1406 sglq->ndlp = NULL; in __lpfc_sli_release_iocbq_s4()
1416 sglq->ndlp = NULL; in __lpfc_sli_release_iocbq_s4()
2841 __lpfc_sli_rpi_release(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) in __lpfc_sli_rpi_release() argument
2845 if (ndlp->nlp_flag & NLP_RELEASE_RPI) { in __lpfc_sli_rpi_release()
2846 lpfc_sli4_free_rpi(vport->phba, ndlp->nlp_rpi); in __lpfc_sli_rpi_release()
2847 spin_lock_irqsave(&ndlp->lock, iflags); in __lpfc_sli_rpi_release()
2848 ndlp->nlp_flag &= ~NLP_RELEASE_RPI; in __lpfc_sli_rpi_release()
2849 ndlp->nlp_rpi = LPFC_RPI_ALLOC_ERROR; in __lpfc_sli_rpi_release()
2850 spin_unlock_irqrestore(&ndlp->lock, iflags); in __lpfc_sli_rpi_release()
2852 ndlp->nlp_flag &= ~NLP_UNREG_INP; in __lpfc_sli_rpi_release()
2856 lpfc_sli_rpi_release(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) in lpfc_sli_rpi_release() argument
2858 __lpfc_sli_rpi_release(vport, ndlp); in lpfc_sli_rpi_release()
2876 struct lpfc_nodelist *ndlp; in lpfc_sli_def_mbox_cmpl() local
2917 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp; in lpfc_sli_def_mbox_cmpl()
2918 lpfc_nlp_put(ndlp); in lpfc_sli_def_mbox_cmpl()
2922 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp; in lpfc_sli_def_mbox_cmpl()
2925 if (ndlp) { in lpfc_sli_def_mbox_cmpl()
2931 ndlp->nlp_rpi, ndlp->nlp_DID, in lpfc_sli_def_mbox_cmpl()
2932 ndlp->nlp_flag, ndlp->nlp_defer_did, in lpfc_sli_def_mbox_cmpl()
2933 ndlp, vport->load_flag, kref_read(&ndlp->kref)); in lpfc_sli_def_mbox_cmpl()
2935 if ((ndlp->nlp_flag & NLP_UNREG_INP) && in lpfc_sli_def_mbox_cmpl()
2936 (ndlp->nlp_defer_did != NLP_EVT_NOTHING_PENDING)) { in lpfc_sli_def_mbox_cmpl()
2937 ndlp->nlp_flag &= ~NLP_UNREG_INP; in lpfc_sli_def_mbox_cmpl()
2938 ndlp->nlp_defer_did = NLP_EVT_NOTHING_PENDING; in lpfc_sli_def_mbox_cmpl()
2939 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0); in lpfc_sli_def_mbox_cmpl()
2941 __lpfc_sli_rpi_release(vport, ndlp); in lpfc_sli_def_mbox_cmpl()
2948 lpfc_nlp_put(ndlp); in lpfc_sli_def_mbox_cmpl()
2955 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp; in lpfc_sli_def_mbox_cmpl()
2956 lpfc_nlp_put(ndlp); in lpfc_sli_def_mbox_cmpl()
2988 struct lpfc_nodelist *ndlp; in lpfc_sli4_unreg_rpi_cmpl_clr() local
2990 ndlp = pmb->ctx_ndlp; in lpfc_sli4_unreg_rpi_cmpl_clr()
2996 if (ndlp) { in lpfc_sli4_unreg_rpi_cmpl_clr()
3002 vport->vpi, ndlp->nlp_rpi, in lpfc_sli4_unreg_rpi_cmpl_clr()
3003 ndlp->nlp_DID, ndlp->nlp_defer_did, in lpfc_sli4_unreg_rpi_cmpl_clr()
3004 ndlp->nlp_flag, in lpfc_sli4_unreg_rpi_cmpl_clr()
3005 ndlp); in lpfc_sli4_unreg_rpi_cmpl_clr()
3006 ndlp->nlp_flag &= ~NLP_LOGO_ACC; in lpfc_sli4_unreg_rpi_cmpl_clr()
3011 if ((ndlp->nlp_flag & NLP_UNREG_INP) && in lpfc_sli4_unreg_rpi_cmpl_clr()
3012 (ndlp->nlp_defer_did != in lpfc_sli4_unreg_rpi_cmpl_clr()
3019 ndlp->nlp_rpi, ndlp->nlp_DID, in lpfc_sli4_unreg_rpi_cmpl_clr()
3020 ndlp->nlp_defer_did, ndlp); in lpfc_sli4_unreg_rpi_cmpl_clr()
3021 ndlp->nlp_flag &= ~NLP_UNREG_INP; in lpfc_sli4_unreg_rpi_cmpl_clr()
3022 ndlp->nlp_defer_did = in lpfc_sli4_unreg_rpi_cmpl_clr()
3025 vport, ndlp->nlp_DID, 0); in lpfc_sli4_unreg_rpi_cmpl_clr()
3027 __lpfc_sli_rpi_release(vport, ndlp); in lpfc_sli4_unreg_rpi_cmpl_clr()
3029 lpfc_nlp_put(ndlp); in lpfc_sli4_unreg_rpi_cmpl_clr()
3212 struct lpfc_nodelist *ndlp; in lpfc_nvme_unsol_ls_handler() local
3263 ndlp = lpfc_findnode_did(phba->pport, sid); in lpfc_nvme_unsol_ls_handler()
3264 if (!ndlp || in lpfc_nvme_unsol_ls_handler()
3265 ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) && in lpfc_nvme_unsol_ls_handler()
3266 (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) { in lpfc_nvme_unsol_ls_handler()
3275 axchg->ndlp = ndlp; in lpfc_nvme_unsol_ls_handler()
3289 spin_lock_irq(&ndlp->lock); in lpfc_nvme_unsol_ls_handler()
3290 if (!ret && !(ndlp->fc4_xpt_flags & NLP_XPT_HAS_HH)) { in lpfc_nvme_unsol_ls_handler()
3291 ndlp->fc4_xpt_flags |= NLP_XPT_HAS_HH; in lpfc_nvme_unsol_ls_handler()
3292 spin_unlock_irq(&ndlp->lock); in lpfc_nvme_unsol_ls_handler()
3298 if (!lpfc_nlp_get(ndlp)) in lpfc_nvme_unsol_ls_handler()
3304 ndlp, ndlp->nlp_DID, in lpfc_nvme_unsol_ls_handler()
3305 ndlp->fc4_xpt_flags, in lpfc_nvme_unsol_ls_handler()
3306 kref_read(&ndlp->kref)); in lpfc_nvme_unsol_ls_handler()
3308 spin_unlock_irq(&ndlp->lock); in lpfc_nvme_unsol_ls_handler()
11380 struct lpfc_nodelist *ndlp) in lpfc_sli_post_recovery_event() argument
11383 struct lpfc_work_evt *evtp = &ndlp->recovery_evt; in lpfc_sli_post_recovery_event()
11386 if (!lpfc_nlp_get(ndlp)) in lpfc_sli_post_recovery_event()
11392 lpfc_nlp_put(ndlp); in lpfc_sli_post_recovery_event()
11396 evtp->evt_arg1 = ndlp; in lpfc_sli_post_recovery_event()
11420 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_abts_err_handler() local
11436 ndlp = lpfc_findnode_rpi(vport, rpi); in lpfc_sli_abts_err_handler()
11437 if (!ndlp) in lpfc_sli_abts_err_handler()
11441 lpfc_sli_abts_recover_port(vport, ndlp); in lpfc_sli_abts_err_handler()
11464 struct lpfc_nodelist *ndlp, in lpfc_sli4_abts_err_handler() argument
11469 if (!ndlp) { in lpfc_sli4_abts_err_handler()
11479 ndlp->vport->vpi, phba->sli4_hba.rpi_ids[ndlp->nlp_rpi], in lpfc_sli4_abts_err_handler()
11492 lpfc_sli_post_recovery_event(phba, ndlp); in lpfc_sli4_abts_err_handler()
12345 struct lpfc_nodelist *ndlp = cmdiocb->ndlp; in lpfc_ignore_els_cmpl() local
12376 cmdiocb->ndlp); in lpfc_ignore_els_cmpl()
12386 lpfc_nlp_put(ndlp); in lpfc_ignore_els_cmpl()
12412 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_issue_abort_iotag() local
12465 ndlp = cmdiocb->ndlp; in lpfc_sli_issue_abort_iotag()
12466 ulp_context = ndlp->nlp_rpi; in lpfc_sli_issue_abort_iotag()
12849 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_abort_taskmgmt() local
12924 ndlp = iocbq->ndlp; in lpfc_sli_abort_taskmgmt()
12925 ulp_context = ndlp->nlp_rpi; in lpfc_sli_abort_taskmgmt()
12931 ndlp = lpfc_cmd->rdata->pnode; in lpfc_sli_abort_taskmgmt()
12934 (ndlp && ndlp->nlp_state == NLP_STE_MAPPED_NODE) && in lpfc_sli_abort_taskmgmt()
13645 struct lpfc_nodelist *ndlp; in lpfc_sli_sp_intr_handler() local
13844 ndlp = (struct lpfc_nodelist *) in lpfc_sli_sp_intr_handler()
13859 pmb->ctx_ndlp = ndlp; in lpfc_sli_sp_intr_handler()
14301 struct lpfc_nodelist *ndlp; in lpfc_sli4_sp_handle_mbox_event() local
14353 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp; in lpfc_sli4_sp_handle_mbox_event()
14360 spin_lock_irqsave(&ndlp->lock, iflags); in lpfc_sli4_sp_handle_mbox_event()
14361 ndlp->nlp_flag |= NLP_UNREG_INP; in lpfc_sli4_sp_handle_mbox_event()
14362 spin_unlock_irqrestore(&ndlp->lock, iflags); in lpfc_sli4_sp_handle_mbox_event()
14373 pmb->ctx_ndlp = ndlp; in lpfc_sli4_sp_handle_mbox_event()
18904 lpfc_nlp_put(cmd_iocbq->ndlp); in lpfc_sli4_seq_abort_rsp_cmpl()
18952 struct lpfc_nodelist *ndlp; in lpfc_sli4_seq_abort_rsp() local
18965 ndlp = lpfc_findnode_did(vport, sid); in lpfc_sli4_seq_abort_rsp()
18966 if (!ndlp) { in lpfc_sli4_seq_abort_rsp()
18967 ndlp = lpfc_nlp_init(vport, sid); in lpfc_sli4_seq_abort_rsp()
18968 if (!ndlp) { in lpfc_sli4_seq_abort_rsp()
18975 lpfc_enqueue_node(vport, ndlp); in lpfc_sli4_seq_abort_rsp()
18988 ctiocb->ndlp = lpfc_nlp_get(ndlp); in lpfc_sli4_seq_abort_rsp()
18989 if (!ctiocb->ndlp) { in lpfc_sli4_seq_abort_rsp()
19009 lpfc_set_rrq_active(phba, ndlp, lxri, in lpfc_sli4_seq_abort_rsp()
19060 ndlp->nlp_DID); in lpfc_sli4_seq_abort_rsp()
19062 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli4_seq_abort_rsp()
19077 lpfc_nlp_put(ndlp); in lpfc_sli4_seq_abort_rsp()
19078 ctiocb->ndlp = NULL; in lpfc_sli4_seq_abort_rsp()
19860 lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp, in lpfc_sli4_resume_rpi() argument
19864 struct lpfc_hba *phba = ndlp->phba; in lpfc_sli4_resume_rpi()
19878 if (!lpfc_nlp_get(ndlp)) { in lpfc_sli4_resume_rpi()
19887 lpfc_resume_rpi(mboxq, ndlp); in lpfc_sli4_resume_rpi()
19893 mboxq->ctx_ndlp = ndlp; in lpfc_sli4_resume_rpi()
19894 mboxq->vport = ndlp->vport; in lpfc_sli4_resume_rpi()
19901 lpfc_nlp_put(ndlp); in lpfc_sli4_resume_rpi()
21042 struct lpfc_nodelist *ndlp; in lpfc_cleanup_pending_mbox() local
21095 ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp; in lpfc_cleanup_pending_mbox()
21100 spin_lock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21101 ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL; in lpfc_cleanup_pending_mbox()
21102 spin_unlock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21115 ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp; in lpfc_cleanup_pending_mbox()
21117 if (ndlp) { in lpfc_cleanup_pending_mbox()
21118 spin_lock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21119 ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL; in lpfc_cleanup_pending_mbox()
21120 spin_unlock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21121 lpfc_nlp_put(ndlp); in lpfc_cleanup_pending_mbox()
21982 struct lpfc_nodelist *ndlp) in lpfc_get_io_buf_from_private_pool() argument
21992 phba, ndlp, lpfc_ncmd->cur_iocbq.sli4_lxritag)) in lpfc_get_io_buf_from_private_pool()
22064 struct lpfc_nodelist *ndlp, in lpfc_get_io_buf_from_multixri_pools() argument
22101 lpfc_ncmd = lpfc_get_io_buf_from_private_pool(phba, qp, pvt_pool, ndlp); in lpfc_get_io_buf_from_multixri_pools()
22117 lpfc_io_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, int idx) in lpfc_io_buf() argument
22125 if (lpfc_test_rrq_active(phba, ndlp, in lpfc_io_buf()
22160 struct lpfc_nodelist *ndlp, in lpfc_get_io_buf() argument
22178 phba, ndlp, hwqid, expedite); in lpfc_get_io_buf()
22183 lpfc_cmd = lpfc_io_buf(phba, ndlp, hwqid); in lpfc_get_io_buf()
22195 lpfc_cmd = lpfc_io_buf(phba, ndlp, hwqid); in lpfc_get_io_buf()
22620 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_prep_wqe() local
22638 ndlp = job->ndlp; in lpfc_sli_prep_wqe()
22669 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli_prep_wqe()
22674 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli_prep_wqe()
22683 ndlp = job->ndlp; in lpfc_sli_prep_wqe()
22718 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli_prep_wqe()