Lines Matching refs:ndlp

57 lpfc_get_nvme_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
359 struct lpfc_nodelist *ndlp;
361 ndlp = rport->ndlp;
362 if (!ndlp)
365 vport = ndlp->vport;
370 * transport. Remove the ndlp reference for the NVME transport before
381 if (ndlp->upcall_flags & NLP_WAIT_FOR_UNREG) {
382 ndlp->nrport = NULL;
383 ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
389 lpfc_nlp_put(ndlp);
426 vport = axchg->ndlp->vport;
427 lpfc_rport = axchg->ndlp->nrport;
475 struct lpfc_nodelist *ndlp;
479 ndlp = (struct lpfc_nodelist *)cmdwqe->context1;
485 "ndlp:x%px\n",
486 pnvme_lsreq, ndlp ? ndlp->nlp_DID : 0,
489 cmdwqe, pnvme_lsreq, cmdwqe->context3, ndlp);
506 pnvme_lsreq, ndlp ? ndlp->nlp_DID : 0,
508 if (ndlp) {
509 lpfc_nlp_put(ndlp);
546 struct lpfc_nodelist *ndlp, uint32_t num_entry,
569 genwqe->context1 = lpfc_nlp_get(ndlp);
613 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
648 genwqe->sli4_xritag, genwqe->iotag, ndlp->nlp_DID);
655 ndlp->nlp_DID, genwqe->iotag,
665 ndlp->nlp_DID, genwqe->sli4_xritag,
675 * @ndlp: The remote port to send the LS to
679 * Routine validates the ndlp, builds buffers and sends a GEN_REQUEST
687 __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
698 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
702 ndlp);
706 ntype = ndlp->nlp_type;
707 nstate = ndlp->nlp_state;
713 ndlp->nlp_DID, ntype, nstate);
737 ndlp->nlp_DID);
746 ndlp->nlp_DID);
770 ndlp->nlp_DID, pnvme_lsreq, pnvme_lsreq->rqstlen,
775 pnvme_lsreq, gen_req_cmp, ndlp, 2,
781 pnvme_lsreq, ret, ndlp->nlp_DID);
824 ret = __lpfc_nvme_ls_req(vport, rport->ndlp, pnvme_lsreq,
836 * @ndlp: The remote port the LS was sent to
839 * The driver validates the ndlp, looks for the LS, and aborts the
847 __lpfc_nvme_ls_abort(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
855 if (!ndlp) {
859 ndlp, ndlp ? ndlp->nlp_DID : 0);
947 struct lpfc_nodelist *ndlp;
959 ndlp = lpfc_findnode_did(vport, pnvme_rport->port_id);
961 ret = __lpfc_nvme_ls_abort(vport, ndlp, pnvme_lsreq);
1085 struct lpfc_nodelist *ndlp;
1139 ndlp = lpfc_ncmd->ndlp;
1140 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
1142 "6062 Ignoring NVME cmpl. No ndlp\n");
1623 struct lpfc_nodelist *ndlp;
1682 ndlp = rport->ndlp;
1683 if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
1685 "6053 Busy IO, ndlp not ready: rport x%px "
1686 "ndlp x%px, DID x%06x\n",
1687 rport, ndlp, pnvme_rport->port_id);
1694 if ((ndlp->nlp_type & NLP_NVME_TARGET) &&
1695 (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) {
1700 ndlp->nlp_state, ndlp->nlp_type,
1701 ndlp->upcall_flags);
1722 if (lpfc_ndlp_check_qdepth(phba, ndlp)) {
1723 if ((atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth) &&
1726 "6174 Fail IO, ndlp qdepth exceeded: "
1728 lpfc_queue_info->index, ndlp->nlp_DID,
1729 atomic_read(&ndlp->cmd_pending),
1730 ndlp->cmd_qdepth);
1745 lpfc_ncmd = lpfc_get_nvme_buf(phba, ndlp, idx, expedite);
1751 lpfc_queue_info->index, ndlp->nlp_DID);
1772 lpfc_ncmd->ndlp = ndlp;
1786 lpfc_nvme_prep_io_cmd(vport, lpfc_ncmd, ndlp, cstat);
1792 lpfc_queue_info->index, ndlp->nlp_DID);
1800 lpfc_queue_info->index, ndlp->nlp_DID);
1808 ret, vport->fc_myDID, ndlp->nlp_DID,
2097 lpfc_get_nvme_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
2133 if (lpfc_ndlp_check_qdepth(phba, ndlp)) {
2134 atomic_inc(&ndlp->cmd_pending);
2162 if ((lpfc_ncmd->flags & LPFC_SBUF_BUMP_QDEPTH) && lpfc_ncmd->ndlp)
2163 atomic_dec(&lpfc_ncmd->ndlp->cmd_pending);
2165 lpfc_ncmd->ndlp = NULL;
2429 lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2440 struct fc_rport *srport = ndlp->rport;
2442 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NVME_DISC,
2444 ndlp->nlp_DID, ndlp->nlp_type);
2459 rpinfo.port_id = ndlp->nlp_DID;
2460 if (ndlp->nlp_type & NLP_NVME_TARGET)
2462 if (ndlp->nlp_type & NLP_NVME_INITIATOR)
2465 if (ndlp->nlp_type & NLP_NVME_DISCOVERY)
2468 rpinfo.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn);
2469 rpinfo.node_name = wwn_to_u64(ndlp->nlp_nodename.u.wwn);
2476 oldrport = lpfc_ndlp_get_nrport(ndlp);
2478 prev_ndlp = oldrport->ndlp;
2482 lpfc_nlp_get(ndlp);
2487 /* If the ndlp already has an nrport, this is just
2495 ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
2500 /* Sever the ndlp<->rport association
2501 * before dropping the ndlp ref from
2505 ndlp->nrport = NULL;
2506 ndlp->upcall_flags &= ~NLP_WAIT_FOR_UNREG;
2508 rport->ndlp = NULL;
2515 if (prev_ndlp && prev_ndlp != ndlp) {
2522 /* Clean bind the rport to the ndlp. */
2525 rport->ndlp = ndlp;
2527 ndlp->nrport = rport;
2534 "x%06x Role x%x, ndlp %p prev_ndlp x%px\n",
2538 ndlp, prev_ndlp);
2544 ret, ndlp->nlp_DID);
2556 * If the ndlp represents an NVME Target, that we are logged into,
2561 lpfc_nvme_rescan_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2568 nrport = lpfc_ndlp_get_nrport(ndlp);
2576 ndlp->nlp_DID, ndlp->nlp_type, ndlp->nlp_state,
2584 ndlp->nlp_state == NLP_STE_MAPPED_NODE) {
2590 ndlp->nlp_DID, remoteport->port_state);
2608 * Notes - the ndlp reference count is not decremented here since
2613 lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2635 rport = lpfc_ndlp_get_nrport(ndlp);
2647 ndlp->nlp_type);
2649 /* Sanity check ndlp type. Only call for NVME ports. Don't
2653 if (ndlp->nlp_type & NLP_NVME_TARGET) {
2657 ndlp->upcall_flags |= NLP_WAIT_FOR_UNREG;
2669 lpfc_nlp_put(ndlp);
2682 vport->localport, ndlp->rport, ndlp->nlp_DID);
2702 struct lpfc_nodelist *ndlp = lpfc_ncmd->ndlp;
2705 if (ndlp)
2706 lpfc_sli4_abts_err_handler(phba, ndlp, axri);