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()
11394 struct lpfc_nodelist *ndlp) in lpfc_sli_post_recovery_event() argument
11397 struct lpfc_work_evt *evtp = &ndlp->recovery_evt; in lpfc_sli_post_recovery_event()
11406 evtp->evt_arg1 = lpfc_nlp_get(ndlp); in lpfc_sli_post_recovery_event()
11434 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_abts_err_handler() local
11450 ndlp = lpfc_findnode_rpi(vport, rpi); in lpfc_sli_abts_err_handler()
11451 if (!ndlp) in lpfc_sli_abts_err_handler()
11455 lpfc_sli_abts_recover_port(vport, ndlp); in lpfc_sli_abts_err_handler()
11478 struct lpfc_nodelist *ndlp, in lpfc_sli4_abts_err_handler() argument
11483 if (!ndlp) { in lpfc_sli4_abts_err_handler()
11493 ndlp->vport->vpi, phba->sli4_hba.rpi_ids[ndlp->nlp_rpi], in lpfc_sli4_abts_err_handler()
11506 lpfc_sli_post_recovery_event(phba, ndlp); in lpfc_sli4_abts_err_handler()
12359 struct lpfc_nodelist *ndlp = cmdiocb->ndlp; in lpfc_ignore_els_cmpl() local
12390 cmdiocb->ndlp); in lpfc_ignore_els_cmpl()
12400 lpfc_nlp_put(ndlp); in lpfc_ignore_els_cmpl()
12426 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_issue_abort_iotag() local
12479 ndlp = cmdiocb->ndlp; in lpfc_sli_issue_abort_iotag()
12480 ulp_context = ndlp->nlp_rpi; in lpfc_sli_issue_abort_iotag()
12863 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_abort_taskmgmt() local
12938 ndlp = iocbq->ndlp; in lpfc_sli_abort_taskmgmt()
12939 ulp_context = ndlp->nlp_rpi; in lpfc_sli_abort_taskmgmt()
12945 ndlp = lpfc_cmd->rdata->pnode; in lpfc_sli_abort_taskmgmt()
12948 (ndlp && ndlp->nlp_state == NLP_STE_MAPPED_NODE) && in lpfc_sli_abort_taskmgmt()
13659 struct lpfc_nodelist *ndlp; in lpfc_sli_sp_intr_handler() local
13858 ndlp = (struct lpfc_nodelist *) in lpfc_sli_sp_intr_handler()
13873 pmb->ctx_ndlp = ndlp; in lpfc_sli_sp_intr_handler()
14315 struct lpfc_nodelist *ndlp; in lpfc_sli4_sp_handle_mbox_event() local
14367 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp; in lpfc_sli4_sp_handle_mbox_event()
14374 spin_lock_irqsave(&ndlp->lock, iflags); in lpfc_sli4_sp_handle_mbox_event()
14375 ndlp->nlp_flag |= NLP_UNREG_INP; in lpfc_sli4_sp_handle_mbox_event()
14376 spin_unlock_irqrestore(&ndlp->lock, iflags); in lpfc_sli4_sp_handle_mbox_event()
14387 pmb->ctx_ndlp = ndlp; in lpfc_sli4_sp_handle_mbox_event()
18789 lpfc_nlp_put(cmd_iocbq->ndlp); in lpfc_sli4_seq_abort_rsp_cmpl()
18837 struct lpfc_nodelist *ndlp; in lpfc_sli4_seq_abort_rsp() local
18850 ndlp = lpfc_findnode_did(vport, sid); in lpfc_sli4_seq_abort_rsp()
18851 if (!ndlp) { in lpfc_sli4_seq_abort_rsp()
18852 ndlp = lpfc_nlp_init(vport, sid); in lpfc_sli4_seq_abort_rsp()
18853 if (!ndlp) { in lpfc_sli4_seq_abort_rsp()
18860 lpfc_enqueue_node(vport, ndlp); in lpfc_sli4_seq_abort_rsp()
18873 ctiocb->ndlp = lpfc_nlp_get(ndlp); in lpfc_sli4_seq_abort_rsp()
18874 if (!ctiocb->ndlp) { in lpfc_sli4_seq_abort_rsp()
18894 lpfc_set_rrq_active(phba, ndlp, lxri, in lpfc_sli4_seq_abort_rsp()
18945 ndlp->nlp_DID); in lpfc_sli4_seq_abort_rsp()
18947 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli4_seq_abort_rsp()
18962 lpfc_nlp_put(ndlp); in lpfc_sli4_seq_abort_rsp()
18963 ctiocb->ndlp = NULL; in lpfc_sli4_seq_abort_rsp()
19745 lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp, in lpfc_sli4_resume_rpi() argument
19749 struct lpfc_hba *phba = ndlp->phba; in lpfc_sli4_resume_rpi()
19763 if (!lpfc_nlp_get(ndlp)) { in lpfc_sli4_resume_rpi()
19772 lpfc_resume_rpi(mboxq, ndlp); in lpfc_sli4_resume_rpi()
19778 mboxq->ctx_ndlp = ndlp; in lpfc_sli4_resume_rpi()
19779 mboxq->vport = ndlp->vport; in lpfc_sli4_resume_rpi()
19786 lpfc_nlp_put(ndlp); in lpfc_sli4_resume_rpi()
20927 struct lpfc_nodelist *ndlp; in lpfc_cleanup_pending_mbox() local
20980 ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp; in lpfc_cleanup_pending_mbox()
20985 spin_lock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
20986 ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL; in lpfc_cleanup_pending_mbox()
20987 spin_unlock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21000 ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp; in lpfc_cleanup_pending_mbox()
21002 if (ndlp) { in lpfc_cleanup_pending_mbox()
21003 spin_lock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21004 ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL; in lpfc_cleanup_pending_mbox()
21005 spin_unlock(&ndlp->lock); in lpfc_cleanup_pending_mbox()
21006 lpfc_nlp_put(ndlp); in lpfc_cleanup_pending_mbox()
21867 struct lpfc_nodelist *ndlp) in lpfc_get_io_buf_from_private_pool() argument
21877 phba, ndlp, lpfc_ncmd->cur_iocbq.sli4_lxritag)) in lpfc_get_io_buf_from_private_pool()
21949 struct lpfc_nodelist *ndlp, in lpfc_get_io_buf_from_multixri_pools() argument
21986 lpfc_ncmd = lpfc_get_io_buf_from_private_pool(phba, qp, pvt_pool, ndlp); in lpfc_get_io_buf_from_multixri_pools()
22002 lpfc_io_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, int idx) in lpfc_io_buf() argument
22010 if (lpfc_test_rrq_active(phba, ndlp, in lpfc_io_buf()
22045 struct lpfc_nodelist *ndlp, in lpfc_get_io_buf() argument
22063 phba, ndlp, hwqid, expedite); in lpfc_get_io_buf()
22068 lpfc_cmd = lpfc_io_buf(phba, ndlp, hwqid); in lpfc_get_io_buf()
22080 lpfc_cmd = lpfc_io_buf(phba, ndlp, hwqid); in lpfc_get_io_buf()
22505 struct lpfc_nodelist *ndlp = NULL; in lpfc_sli_prep_wqe() local
22523 ndlp = job->ndlp; in lpfc_sli_prep_wqe()
22554 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli_prep_wqe()
22559 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli_prep_wqe()
22568 ndlp = job->ndlp; in lpfc_sli_prep_wqe()
22603 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]); in lpfc_sli_prep_wqe()