Lines Matching refs:ndlp
861 struct lpfc_nodelist *ndlp = NULL;
863 if ((rrq->vport) && NLP_CHK_NODE_ACT(rrq->ndlp))
864 ndlp = lpfc_findnode_did(rrq->vport, rrq->nlp_DID);
867 * we should use the ndlp from the findnode if it is
870 if ((!ndlp) && rrq->ndlp)
871 ndlp = rrq->ndlp;
873 if (!ndlp)
876 if (test_and_clear_bit(xritag, ndlp->active_rrqs_xri_bitmap)) {
972 * @ndlp: Pointer to the lpfc_node_list structure.
973 * If ndlp is NULL Remove all active RRQs for this vport from the
975 * If ndlp is not NULL then only remove rrqs for this vport & this ndlp.
978 lpfc_cleanup_vports_rrqs(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
989 if (!ndlp) {
995 if ((rrq->vport == vport) && (!ndlp || rrq->ndlp == ndlp))
1008 * @ndlp: Targets nodelist pointer for this exchange.
1016 lpfc_test_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
1019 if (!ndlp)
1021 if (!ndlp->active_rrqs_xri_bitmap)
1023 if (test_bit(xritag, ndlp->active_rrqs_xri_bitmap))
1032 * @ndlp: nodelist pointer for this target.
1042 * < 0 No memory or invalid ndlp.
1045 lpfc_set_rrq_active(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
1052 if (!ndlp)
1067 if (NLP_CHK_FREE_REQ(ndlp))
1070 if (ndlp->vport && (ndlp->vport->load_flag & FC_UNLOADING))
1073 if (!ndlp->active_rrqs_xri_bitmap)
1076 if (test_and_set_bit(xritag, ndlp->active_rrqs_xri_bitmap))
1085 xritag, rxid, ndlp->nlp_DID, send_rrq);
1095 rrq->ndlp = ndlp;
1096 rrq->nlp_DID = ndlp->nlp_DID;
1097 rrq->vport = ndlp->vport;
1112 xritag, rxid, ndlp->nlp_DID, send_rrq);
1134 struct lpfc_nodelist *ndlp;
1147 ndlp = lpfc_cmd->rdata->pnode;
1150 ndlp = piocbq->context_un.ndlp;
1153 ndlp = NULL;
1155 ndlp = piocbq->context_un.ndlp;
1157 ndlp = piocbq->context1;
1166 if (ndlp && ndlp->active_rrqs_xri_bitmap &&
1168 ndlp->active_rrqs_xri_bitmap)) {
1183 sglq->ndlp = ndlp;
1279 sglq->ndlp = NULL;
1300 sglq->ndlp = NULL;
2446 __lpfc_sli_rpi_release(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2450 if (ndlp->nlp_flag & NLP_RELEASE_RPI) {
2451 lpfc_sli4_free_rpi(vport->phba, ndlp->nlp_rpi);
2453 ndlp->nlp_flag &= ~NLP_RELEASE_RPI;
2454 ndlp->nlp_rpi = LPFC_RPI_ALLOC_ERROR;
2457 ndlp->nlp_flag &= ~NLP_UNREG_INP;
2475 struct lpfc_nodelist *ndlp;
2517 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;
2518 lpfc_nlp_put(ndlp);
2524 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;
2527 if (ndlp) {
2533 ndlp->nlp_rpi, ndlp->nlp_DID,
2534 ndlp->nlp_flag, ndlp->nlp_defer_did, ndlp);
2536 if ((ndlp->nlp_flag & NLP_UNREG_INP) &&
2537 (ndlp->nlp_defer_did != NLP_EVT_NOTHING_PENDING)) {
2538 ndlp->nlp_flag &= ~NLP_UNREG_INP;
2539 ndlp->nlp_defer_did = NLP_EVT_NOTHING_PENDING;
2540 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0);
2542 __lpfc_sli_rpi_release(vport, ndlp);
2545 lpfc_nlp_put(ndlp);
2569 * command. An additional refrenece is put on the ndlp to prevent
2579 struct lpfc_nodelist *ndlp;
2581 ndlp = pmb->ctx_ndlp;
2587 if (ndlp) {
2593 vport->vpi, ndlp->nlp_rpi,
2594 ndlp->nlp_DID, ndlp->nlp_defer_did,
2595 ndlp->nlp_flag,
2596 ndlp->nlp_usg_map, ndlp);
2597 ndlp->nlp_flag &= ~NLP_LOGO_ACC;
2598 lpfc_nlp_put(ndlp);
2603 if ((ndlp->nlp_flag & NLP_UNREG_INP) &&
2604 (ndlp->nlp_defer_did !=
2611 ndlp->nlp_rpi, ndlp->nlp_DID,
2612 ndlp->nlp_defer_did, ndlp);
2613 ndlp->nlp_flag &= ~NLP_UNREG_INP;
2614 ndlp->nlp_defer_did =
2617 vport, ndlp->nlp_DID, 0);
2619 __lpfc_sli_rpi_release(vport, ndlp);
2803 struct lpfc_nodelist *ndlp;
2854 ndlp = lpfc_findnode_did(phba->pport, sid);
2855 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp) ||
2856 ((ndlp->nlp_state != NLP_STE_UNMAPPED_NODE) &&
2857 (ndlp->nlp_state != NLP_STE_MAPPED_NODE))) {
2859 "6216 NVME Unsol rcv: No ndlp: "
2866 axchg->ndlp = ndlp;
9534 struct lpfc_nodelist *ndlp;
9588 ndlp = iocbq->context_un.ndlp;
9590 ndlp = (struct lpfc_nodelist *)iocbq->context1;
9641 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
9645 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
9917 ndlp = (struct lpfc_nodelist *)iocbq->context1;
9955 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
10008 ndlp = (struct lpfc_nodelist *)iocbq->context1;
10038 ndlp->nlp_DID);
10377 struct lpfc_nodelist *ndlp)
10380 struct lpfc_work_evt *evtp = &ndlp->recovery_evt;
10389 evtp->evt_arg1 = lpfc_nlp_get(ndlp);
10417 struct lpfc_nodelist *ndlp = NULL;
10433 ndlp = lpfc_findnode_rpi(vport, rpi);
10434 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp))
10438 lpfc_sli_abts_recover_port(vport, ndlp);
10451 * @ndlp: nodelist pointer for the impacted rport.
10461 struct lpfc_nodelist *ndlp,
10466 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
10476 ndlp->vport->vpi, phba->sli4_hba.rpi_ids[ndlp->nlp_rpi],
10489 lpfc_sli_post_recovery_event(phba, ndlp);
11389 struct lpfc_nodelist *ndlp;
11421 ndlp = (struct lpfc_nodelist *)(cmdiocb->context1);
11422 iabt->un.acxri.abortContextTag = ndlp->nlp_rpi;
11844 struct lpfc_nodelist *ndlp;
11927 ndlp = lpfc_cmd->rdata->pnode;
11930 (ndlp && ndlp->nlp_state == NLP_STE_MAPPED_NODE))
12623 struct lpfc_nodelist *ndlp;
12822 ndlp = (struct lpfc_nodelist *)
12837 pmb->ctx_ndlp = ndlp;
13374 struct lpfc_nodelist *ndlp;
13426 ndlp = (struct lpfc_nodelist *)pmb->ctx_ndlp;
13434 pmb->ctx_ndlp = ndlp;
17854 struct lpfc_nodelist *ndlp;
17857 ndlp = (struct lpfc_nodelist *)cmd_iocbq->context1;
17858 lpfc_nlp_put(ndlp);
17906 struct lpfc_nodelist *ndlp;
17919 ndlp = lpfc_findnode_did(vport, sid);
17920 if (!ndlp) {
17921 ndlp = lpfc_nlp_init(vport, sid);
17922 if (!ndlp) {
17924 "1268 Failed to allocate ndlp for "
17928 /* Put ndlp onto pport node list */
17929 lpfc_enqueue_node(vport, ndlp);
17930 } else if (!NLP_CHK_NODE_ACT(ndlp)) {
17931 /* re-setup ndlp without removing from node list */
17932 ndlp = lpfc_enable_node(vport, ndlp, NLP_STE_UNUSED_NODE);
17933 if (!ndlp) {
17935 "3275 Failed to active ndlp found "
17961 icmd->ulpContext = phba->sli4_hba.rpi_ids[ndlp->nlp_rpi];
17962 ctiocb->context1 = lpfc_nlp_get(ndlp);
17978 lpfc_set_rrq_active(phba, ndlp, lxri,
18032 lpfc_nlp_put(ndlp);
18799 * @ndlp: pointer to lpfc nodelist data structure.
18807 lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
18811 struct lpfc_hba *phba = ndlp->phba;
18820 lpfc_resume_rpi(mboxq, ndlp);
18824 mboxq->ctx_ndlp = ndlp;
18827 mboxq->vport = ndlp->vport;
19907 struct lpfc_nodelist *ndlp;
19958 ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp;
19964 ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL;
19984 ndlp = (struct lpfc_nodelist *)mb->ctx_ndlp;
19986 if (ndlp) {
19988 ndlp->nlp_flag &= ~NLP_IGNR_REG_CMPL;
19990 lpfc_nlp_put(ndlp);
19996 /* Release the ndlp with the cleaned-up active mailbox command */
20772 * @ndlp: pointer to lpfc nodelist data structure.
20784 struct lpfc_nodelist *ndlp)
20794 phba, ndlp, lpfc_ncmd->cur_iocbq.sli4_lxritag))
20844 * @ndlp: pointer to lpfc nodelist data structure.
20857 * Note: ndlp is only used on SCSI side for RRQ testing.
20858 * The caller should pass NULL for ndlp on NVME side.
20866 struct lpfc_nodelist *ndlp,
20885 lpfc_ncmd = lpfc_get_io_buf_from_private_pool(phba, qp, pvt_pool, ndlp);
20901 lpfc_io_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp, int idx)
20909 if (lpfc_test_rrq_active(phba, ndlp,
20928 * @ndlp: pointer to lpfc nodelist data structure.
20936 * Note: ndlp is only used on SCSI side for RRQ testing.
20937 * The caller should pass NULL for ndlp on NVME side.
20944 struct lpfc_nodelist *ndlp,
20956 phba, ndlp, hwqid, expedite);
20961 lpfc_cmd = lpfc_io_buf(phba, ndlp, hwqid);
20973 lpfc_cmd = lpfc_io_buf(phba, ndlp, hwqid);