Lines Matching refs:ndlp
57 lpfc_get_nvme_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
193 struct lpfc_nodelist *ndlp;
196 ndlp = rport->ndlp;
197 if (!ndlp) {
198 pr_err("**** %s: NULL ndlp on rport x%px remoteport x%px\n",
203 vport = ndlp->vport;
205 pr_err("**** %s: Null vport on ndlp x%px, ste x%x rport x%px\n",
206 __func__, ndlp, ndlp->nlp_state, rport);
213 * transport. Remove the ndlp reference for the NVME transport before
217 "6146 remoteport delete of remoteport x%px, ndlp x%px "
219 remoteport, ndlp, ndlp->nlp_DID, ndlp->fc4_xpt_flags);
220 spin_lock_irq(&ndlp->lock);
225 if (ndlp->fc4_xpt_flags & NVME_XPT_UNREG_WAIT)
226 ndlp->fc4_xpt_flags &= ~(NVME_XPT_UNREG_WAIT | NVME_XPT_REGD);
228 spin_unlock_irq(&ndlp->lock);
233 if (!(ndlp->fc4_xpt_flags & fc4_xpt_flags))
234 lpfc_disc_state_machine(vport, ndlp, NULL, NLP_EVT_DEVICE_RM);
268 vport = axchg->ndlp->vport;
269 lpfc_rport = axchg->ndlp->nrport;
318 struct lpfc_nodelist *ndlp;
322 ndlp = cmdwqe->ndlp;
330 "ndlp:x%px\n",
331 pnvme_lsreq, ndlp ? ndlp->nlp_DID : 0,
335 ndlp);
353 pnvme_lsreq, ndlp ? ndlp->nlp_DID : 0,
356 if (ndlp) {
357 lpfc_nlp_put(ndlp);
358 cmdwqe->ndlp = NULL;
395 struct lpfc_nodelist *ndlp, uint32_t num_entry,
418 genwqe->ndlp = lpfc_nlp_get(ndlp);
419 if (!genwqe->ndlp) {
469 phba->sli4_hba.rpi_ids[ndlp->nlp_rpi]);
503 genwqe->sli4_xritag, genwqe->iotag, ndlp->nlp_DID);
510 ndlp->nlp_DID, genwqe->iotag,
512 lpfc_nlp_put(ndlp);
521 ndlp->nlp_DID, genwqe->sli4_xritag,
531 * @ndlp: The remote port to send the LS to
535 * Routine validates the ndlp, builds buffers and sends a GEN_REQUEST
543 __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
554 if (!ndlp) {
558 ndlp);
562 ntype = ndlp->nlp_type;
563 nstate = ndlp->nlp_state;
569 ndlp->nlp_DID, ntype, nstate);
595 ndlp->nlp_DID);
604 ndlp->nlp_DID);
628 ndlp->nlp_DID, pnvme_lsreq, pnvme_lsreq->rqstlen,
633 pnvme_lsreq, gen_req_cmp, ndlp, 2,
639 pnvme_lsreq, ret, ndlp->nlp_DID);
683 ret = __lpfc_nvme_ls_req(vport, rport->ndlp, pnvme_lsreq,
695 * @ndlp: The remote port the LS was sent to
698 * The driver validates the ndlp, looks for the LS, and aborts the
706 __lpfc_nvme_ls_abort(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
714 if (!ndlp) {
718 ndlp, ndlp ? ndlp->nlp_DID : 0);
805 struct lpfc_nodelist *ndlp;
816 ndlp = lpfc_findnode_did(vport, pnvme_rport->port_id);
818 ret = __lpfc_nvme_ls_abort(vport, ndlp, pnvme_lsreq);
942 struct lpfc_nodelist *ndlp;
999 ndlp = lpfc_ncmd->ndlp;
1000 if (!ndlp) {
1002 "6062 Ignoring NVME cmpl. No ndlp\n");
1534 struct lpfc_nodelist *ndlp;
1597 ndlp = rport->ndlp;
1598 if (!ndlp) {
1600 "6053 Busy IO, ndlp not ready: rport x%px "
1601 "ndlp x%px, DID x%06x\n",
1602 rport, ndlp, pnvme_rport->port_id);
1609 if ((ndlp->nlp_type & NLP_NVME_TARGET) &&
1610 (ndlp->nlp_state != NLP_STE_MAPPED_NODE)) {
1615 ndlp->nlp_state, ndlp->nlp_type,
1616 ndlp->fc4_xpt_flags);
1650 if (lpfc_ndlp_check_qdepth(phba, ndlp)) {
1651 if ((atomic_read(&ndlp->cmd_pending) >= ndlp->cmd_qdepth) &&
1654 "6174 Fail IO, ndlp qdepth exceeded: "
1656 lpfc_queue_info->index, ndlp->nlp_DID,
1657 atomic_read(&ndlp->cmd_pending),
1658 ndlp->cmd_qdepth);
1673 lpfc_ncmd = lpfc_get_nvme_buf(phba, ndlp, idx, expedite);
1679 lpfc_queue_info->index, ndlp->nlp_DID);
1701 lpfc_ncmd->ndlp = ndlp;
1707 (ndlp->vmid_support ||
1742 lpfc_nvme_prep_io_cmd(vport, lpfc_ncmd, ndlp, cstat);
1748 lpfc_queue_info->index, ndlp->nlp_DID);
1756 lpfc_queue_info->index, ndlp->nlp_DID);
1764 ret, vport->fc_myDID, ndlp->nlp_DID,
2039 lpfc_get_nvme_buf(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp,
2075 if (lpfc_ndlp_check_qdepth(phba, ndlp)) {
2076 atomic_inc(&ndlp->cmd_pending);
2104 if ((lpfc_ncmd->flags & LPFC_SBUF_BUMP_QDEPTH) && lpfc_ncmd->ndlp)
2105 atomic_dec(&lpfc_ncmd->ndlp->cmd_pending);
2107 lpfc_ncmd->ndlp = NULL;
2382 lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2393 struct fc_rport *srport = ndlp->rport;
2395 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_NVME_DISC,
2397 ndlp->nlp_DID, ndlp->nlp_type);
2412 rpinfo.port_id = ndlp->nlp_DID;
2413 if (ndlp->nlp_type & NLP_NVME_TARGET)
2415 if (ndlp->nlp_type & NLP_NVME_INITIATOR)
2418 if (ndlp->nlp_type & NLP_NVME_DISCOVERY)
2421 rpinfo.port_name = wwn_to_u64(ndlp->nlp_portname.u.wwn);
2422 rpinfo.node_name = wwn_to_u64(ndlp->nlp_nodename.u.wwn);
2428 spin_lock_irq(&ndlp->lock);
2430 /* If an oldrport exists, so does the ndlp reference. If not
2434 oldrport = lpfc_ndlp_get_nrport(ndlp);
2436 prev_ndlp = oldrport->ndlp;
2437 spin_unlock_irq(&ndlp->lock);
2439 spin_unlock_irq(&ndlp->lock);
2440 if (!lpfc_nlp_get(ndlp)) {
2449 /* If the ndlp already has an nrport, this is just
2456 spin_lock_irq(&ndlp->lock);
2457 ndlp->fc4_xpt_flags &= ~NVME_XPT_UNREG_WAIT;
2458 ndlp->fc4_xpt_flags |= NVME_XPT_REGD;
2459 spin_unlock_irq(&ndlp->lock);
2463 /* Sever the ndlp<->rport association
2464 * before dropping the ndlp ref from
2467 spin_lock_irq(&ndlp->lock);
2468 ndlp->nrport = NULL;
2469 ndlp->fc4_xpt_flags &= ~NVME_XPT_UNREG_WAIT;
2470 spin_unlock_irq(&ndlp->lock);
2471 rport->ndlp = NULL;
2478 if (prev_ndlp && prev_ndlp != ndlp) {
2484 /* Clean bind the rport to the ndlp. */
2487 rport->ndlp = ndlp;
2488 spin_lock_irq(&ndlp->lock);
2489 ndlp->nrport = rport;
2490 spin_unlock_irq(&ndlp->lock);
2496 "x%06x Role x%x, ndlp %p prev_ndlp x%px\n",
2500 ndlp, prev_ndlp);
2506 ret, ndlp->nlp_DID, kref_read(&ndlp->kref));
2507 lpfc_nlp_put(ndlp);
2519 * If the ndlp represents an NVME Target, that we are logged into,
2524 lpfc_nvme_rescan_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2530 spin_lock_irq(&ndlp->lock);
2531 nrport = lpfc_ndlp_get_nrport(ndlp);
2534 spin_unlock_irq(&ndlp->lock);
2539 ndlp->nlp_DID, ndlp->nlp_type, ndlp->nlp_state,
2547 ndlp->nlp_state == NLP_STE_MAPPED_NODE) {
2553 ndlp->nlp_DID, remoteport->port_state);
2572 lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2593 spin_lock_irq(&ndlp->lock);
2594 rport = lpfc_ndlp_get_nrport(ndlp);
2597 spin_unlock_irq(&ndlp->lock);
2607 ndlp->nlp_type, kref_read(&ndlp->kref));
2609 /* Sanity check ndlp type. Only call for NVME ports. Don't
2613 if (ndlp->nlp_type & NLP_NVME_TARGET) {
2618 ndlp->fc4_xpt_flags |= NVME_XPT_UNREG_WAIT;
2634 * is asynchronous. Break the binding in the ndlp. Also
2635 * remove the register ndlp reference to setup node release.
2637 ndlp->nrport = NULL;
2638 lpfc_nlp_put(ndlp);
2650 spin_lock_irq(&ndlp->lock);
2651 if (!(ndlp->nlp_flag & NLP_DROPPED)) {
2652 ndlp->nlp_flag |= NLP_DROPPED;
2653 spin_unlock_irq(&ndlp->lock);
2654 lpfc_nlp_put(ndlp);
2657 spin_unlock_irq(&ndlp->lock);
2667 vport->localport, ndlp->rport, ndlp->nlp_DID);
2723 struct lpfc_nodelist *ndlp = lpfc_ncmd->ndlp;
2726 if (ndlp)
2727 lpfc_sli4_abts_err_handler(phba, ndlp, axri);