Lines Matching refs:ndlp

48 lpfc_check_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,  in lpfc_check_adisc()  argument
54 if (memcmp(nn, &ndlp->nlp_nodename, sizeof (struct lpfc_name))) in lpfc_check_adisc()
57 if (memcmp(pn, &ndlp->nlp_portname, sizeof (struct lpfc_name))) in lpfc_check_adisc()
65 lpfc_check_sparm(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_check_sparm() argument
143 memcpy(&ndlp->nlp_nodename, &sp->nodeName, sizeof (struct lpfc_name)); in lpfc_check_sparm()
144 memcpy(&ndlp->nlp_portname, &sp->portName, sizeof (struct lpfc_name)); in lpfc_check_sparm()
151 ndlp->nlp_DID, in lpfc_check_sparm()
200 lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) in lpfc_els_abort() argument
210 lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_DISCOVERY, in lpfc_els_abort()
213 ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, in lpfc_els_abort()
214 ndlp->nlp_rpi); in lpfc_els_abort()
216 lpfc_fabric_abort_nport(ndlp); in lpfc_els_abort()
222 if (lpfc_check_sli_ndlp(phba, pring, iocb, ndlp)) { in lpfc_els_abort()
235 if (lpfc_check_sli_ndlp(phba, pring, iocb, ndlp)) in lpfc_els_abort()
253 lpfc_cancel_retry_delay_tmo(phba->pport, ndlp); in lpfc_els_abort()
258 lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi() argument
295 ndlp, NULL); in lpfc_rcv_plogi()
307 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, in lpfc_rcv_plogi()
316 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, in lpfc_rcv_plogi()
320 if ((lpfc_check_sparm(vport, ndlp, sp, CLASS3, 0) == 0)) { in lpfc_rcv_plogi()
324 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, in lpfc_rcv_plogi()
333 ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag, in lpfc_rcv_plogi()
334 ndlp->nlp_rpi); in lpfc_rcv_plogi()
337 ndlp->nlp_fcp_info |= CLASS2; in lpfc_rcv_plogi()
339 ndlp->nlp_fcp_info |= CLASS3; in lpfc_rcv_plogi()
341 ndlp->nlp_class_sup = 0; in lpfc_rcv_plogi()
343 ndlp->nlp_class_sup |= FC_COS_CLASS1; in lpfc_rcv_plogi()
345 ndlp->nlp_class_sup |= FC_COS_CLASS2; in lpfc_rcv_plogi()
347 ndlp->nlp_class_sup |= FC_COS_CLASS3; in lpfc_rcv_plogi()
349 ndlp->nlp_class_sup |= FC_COS_CLASS4; in lpfc_rcv_plogi()
350 ndlp->nlp_maxframe = in lpfc_rcv_plogi()
358 switch (ndlp->nlp_state) { in lpfc_rcv_plogi()
360 if (!(ndlp->nlp_flag & NLP_NPR_ADISC)) in lpfc_rcv_plogi()
366 lpfc_unreg_rpi(vport, ndlp); in lpfc_rcv_plogi()
367 ndlp->nlp_prev_state = ndlp->nlp_state; in lpfc_rcv_plogi()
368 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_rcv_plogi()
394 (uint8_t *) sp, mbox, ndlp->nlp_rpi); in lpfc_rcv_plogi()
410 ndlp->nlp_flag |= (NLP_ACC_REGLOGIN | NLP_RCV_PLOGI); in lpfc_rcv_plogi()
422 if (ndlp->nlp_state == NLP_STE_PLOGI_ISSUE) { in lpfc_rcv_plogi()
424 lpfc_els_abort(phba, ndlp); in lpfc_rcv_plogi()
436 ndlp->nlp_flag |= NLP_RM_DFLT_RPI; in lpfc_rcv_plogi()
441 ndlp, mbox); in lpfc_rcv_plogi()
444 lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb, ndlp, mbox); in lpfc_rcv_plogi()
449 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); in lpfc_rcv_plogi()
454 lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc() argument
482 if (icmd->ulpStatus == 0 && lpfc_check_adisc(vport, ndlp, pnn, ppn)) { in lpfc_rcv_padisc()
484 lpfc_els_rsp_adisc_acc(vport, cmdiocb, ndlp); in lpfc_rcv_padisc()
486 lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb, ndlp, in lpfc_rcv_padisc()
496 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); in lpfc_rcv_padisc()
499 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); in lpfc_rcv_padisc()
502 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_rcv_padisc()
504 ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; in lpfc_rcv_padisc()
505 ndlp->nlp_prev_state = ndlp->nlp_state; in lpfc_rcv_padisc()
506 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_rcv_padisc()
511 lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo() argument
524 ndlp->nlp_flag |= NLP_LOGO_ACC; in lpfc_rcv_logo()
527 lpfc_els_rsp_acc(vport, ELS_CMD_PRLO, cmdiocb, ndlp, NULL); in lpfc_rcv_logo()
529 lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); in lpfc_rcv_logo()
530 if (ndlp->nlp_DID == Fabric_DID) { in lpfc_rcv_logo()
556 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); in lpfc_rcv_logo()
558 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_rcv_logo()
560 ndlp->nlp_last_elscmd = ELS_CMD_FDISC; in lpfc_rcv_logo()
568 } else if ((!(ndlp->nlp_type & NLP_FABRIC) && in lpfc_rcv_logo()
569 ((ndlp->nlp_type & NLP_FCP_TARGET) || in lpfc_rcv_logo()
570 !(ndlp->nlp_type & NLP_FCP_INITIATOR))) || in lpfc_rcv_logo()
571 (ndlp->nlp_state == NLP_STE_ADISC_ISSUE)) { in lpfc_rcv_logo()
573 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); in lpfc_rcv_logo()
575 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_rcv_logo()
578 ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; in lpfc_rcv_logo()
581 ndlp->nlp_prev_state = ndlp->nlp_state; in lpfc_rcv_logo()
582 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_rcv_logo()
585 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_rcv_logo()
596 lpfc_rcv_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli() argument
602 struct fc_rport *rport = ndlp->rport; in lpfc_rcv_prli()
609 ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR); in lpfc_rcv_prli()
610 ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; in lpfc_rcv_prli()
613 ndlp->nlp_type |= NLP_FCP_INITIATOR; in lpfc_rcv_prli()
615 ndlp->nlp_type |= NLP_FCP_TARGET; in lpfc_rcv_prli()
617 ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE; in lpfc_rcv_prli()
622 if (ndlp->nlp_type & NLP_FCP_INITIATOR) in lpfc_rcv_prli()
624 if (ndlp->nlp_type & NLP_FCP_TARGET) in lpfc_rcv_prli()
629 roles, ndlp->nlp_DID, ndlp->nlp_flag); in lpfc_rcv_prli()
636 lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) in lpfc_disc_set_adisc() argument
640 if (!(ndlp->nlp_flag & NLP_RPI_REGISTERED)) { in lpfc_disc_set_adisc()
641 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_disc_set_adisc()
648 ((ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) && in lpfc_disc_set_adisc()
649 (ndlp->nlp_type & NLP_FCP_TARGET))) { in lpfc_disc_set_adisc()
651 ndlp->nlp_flag |= NLP_NPR_ADISC; in lpfc_disc_set_adisc()
656 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_disc_set_adisc()
657 lpfc_unreg_rpi(vport, ndlp); in lpfc_disc_set_adisc()
692 lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_disc_illegal() argument
712 ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, in lpfc_disc_illegal()
713 ndlp->nlp_flag); in lpfc_disc_illegal()
714 return ndlp->nlp_state; in lpfc_disc_illegal()
718 lpfc_cmpl_plogi_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_plogi_illegal() argument
726 if (!(ndlp->nlp_flag & NLP_RCV_PLOGI)) { in lpfc_cmpl_plogi_illegal()
730 ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, in lpfc_cmpl_plogi_illegal()
731 ndlp->nlp_flag); in lpfc_cmpl_plogi_illegal()
733 return ndlp->nlp_state; in lpfc_cmpl_plogi_illegal()
739 lpfc_rcv_plogi_unused_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_unused_node() argument
746 if (lpfc_rcv_plogi(vport, ndlp, cmdiocb)) { in lpfc_rcv_plogi_unused_node()
747 return ndlp->nlp_state; in lpfc_rcv_plogi_unused_node()
753 lpfc_rcv_els_unused_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_els_unused_node() argument
756 lpfc_issue_els_logo(vport, ndlp, 0); in lpfc_rcv_els_unused_node()
757 return ndlp->nlp_state; in lpfc_rcv_els_unused_node()
761 lpfc_rcv_logo_unused_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_unused_node() argument
768 ndlp->nlp_flag |= NLP_LOGO_ACC; in lpfc_rcv_logo_unused_node()
770 lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); in lpfc_rcv_logo_unused_node()
772 return ndlp->nlp_state; in lpfc_rcv_logo_unused_node()
776 lpfc_cmpl_logo_unused_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_logo_unused_node() argument
783 lpfc_device_rm_unused_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_device_rm_unused_node() argument
790 lpfc_rcv_plogi_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_plogi_issue() argument
816 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, in lpfc_rcv_plogi_plogi_issue()
819 if (lpfc_rcv_plogi(vport, ndlp, cmdiocb) && in lpfc_rcv_plogi_plogi_issue()
820 (ndlp->nlp_flag & NLP_NPR_2B_DISC) && in lpfc_rcv_plogi_plogi_issue()
823 ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; in lpfc_rcv_plogi_plogi_issue()
837 return ndlp->nlp_state; in lpfc_rcv_plogi_plogi_issue()
841 lpfc_rcv_prli_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_plogi_issue() argument
850 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); in lpfc_rcv_prli_plogi_issue()
851 return ndlp->nlp_state; in lpfc_rcv_prli_plogi_issue()
855 lpfc_rcv_logo_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_plogi_issue() argument
861 lpfc_els_abort(vport->phba, ndlp); in lpfc_rcv_logo_plogi_issue()
863 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_plogi_issue()
864 return ndlp->nlp_state; in lpfc_rcv_logo_plogi_issue()
868 lpfc_rcv_els_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_els_plogi_issue() argument
876 lpfc_els_abort(phba, ndlp); in lpfc_rcv_els_plogi_issue()
879 lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); in lpfc_rcv_els_plogi_issue()
881 lpfc_issue_els_logo(vport, ndlp, 0); in lpfc_rcv_els_plogi_issue()
885 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); in lpfc_rcv_els_plogi_issue()
887 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_rcv_els_plogi_issue()
889 ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; in lpfc_rcv_els_plogi_issue()
890 ndlp->nlp_prev_state = NLP_STE_PLOGI_ISSUE; in lpfc_rcv_els_plogi_issue()
891 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_rcv_els_plogi_issue()
893 return ndlp->nlp_state; in lpfc_rcv_els_plogi_issue()
898 struct lpfc_nodelist *ndlp, in lpfc_cmpl_plogi_plogi_issue() argument
914 if (ndlp->nlp_flag & NLP_ACC_REGLOGIN) { in lpfc_cmpl_plogi_plogi_issue()
916 return ndlp->nlp_state; in lpfc_cmpl_plogi_plogi_issue()
932 if ((ndlp->nlp_DID != FDMI_DID) && in lpfc_cmpl_plogi_plogi_issue()
939 if (!lpfc_check_sparm(vport, ndlp, sp, CLASS3, 0)) in lpfc_cmpl_plogi_plogi_issue()
944 ndlp->nlp_DID, ndlp->nlp_state, in lpfc_cmpl_plogi_plogi_issue()
945 ndlp->nlp_flag, ndlp->nlp_rpi); in lpfc_cmpl_plogi_plogi_issue()
947 ndlp->nlp_fcp_info |= CLASS2; in lpfc_cmpl_plogi_plogi_issue()
949 ndlp->nlp_fcp_info |= CLASS3; in lpfc_cmpl_plogi_plogi_issue()
951 ndlp->nlp_class_sup = 0; in lpfc_cmpl_plogi_plogi_issue()
953 ndlp->nlp_class_sup |= FC_COS_CLASS1; in lpfc_cmpl_plogi_plogi_issue()
955 ndlp->nlp_class_sup |= FC_COS_CLASS2; in lpfc_cmpl_plogi_plogi_issue()
957 ndlp->nlp_class_sup |= FC_COS_CLASS3; in lpfc_cmpl_plogi_plogi_issue()
959 ndlp->nlp_class_sup |= FC_COS_CLASS4; in lpfc_cmpl_plogi_plogi_issue()
960 ndlp->nlp_maxframe = in lpfc_cmpl_plogi_plogi_issue()
968 ndlp->nlp_DID, ndlp->nlp_state, in lpfc_cmpl_plogi_plogi_issue()
969 ndlp->nlp_flag, ndlp->nlp_rpi); in lpfc_cmpl_plogi_plogi_issue()
973 lpfc_unreg_rpi(vport, ndlp); in lpfc_cmpl_plogi_plogi_issue()
976 (uint8_t *) sp, mbox, ndlp->nlp_rpi) == 0) { in lpfc_cmpl_plogi_plogi_issue()
977 switch (ndlp->nlp_DID) { in lpfc_cmpl_plogi_plogi_issue()
985 ndlp->nlp_flag |= NLP_REG_LOGIN_SEND; in lpfc_cmpl_plogi_plogi_issue()
988 mbox->context2 = lpfc_nlp_get(ndlp); in lpfc_cmpl_plogi_plogi_issue()
992 lpfc_nlp_set_state(vport, ndlp, in lpfc_cmpl_plogi_plogi_issue()
994 return ndlp->nlp_state; in lpfc_cmpl_plogi_plogi_issue()
996 if (ndlp->nlp_flag & NLP_REG_LOGIN_SEND) in lpfc_cmpl_plogi_plogi_issue()
997 ndlp->nlp_flag &= ~NLP_REG_LOGIN_SEND; in lpfc_cmpl_plogi_plogi_issue()
1001 lpfc_nlp_put(ndlp); in lpfc_cmpl_plogi_plogi_issue()
1010 ndlp->nlp_DID, ndlp->nlp_state, in lpfc_cmpl_plogi_plogi_issue()
1011 ndlp->nlp_flag, ndlp->nlp_rpi); in lpfc_cmpl_plogi_plogi_issue()
1018 ndlp->nlp_DID, ndlp->nlp_state, in lpfc_cmpl_plogi_plogi_issue()
1019 ndlp->nlp_flag, ndlp->nlp_rpi); in lpfc_cmpl_plogi_plogi_issue()
1024 if (ndlp->nlp_DID == NameServer_DID) { in lpfc_cmpl_plogi_plogi_issue()
1031 ndlp->nlp_flag |= NLP_DEFER_RM; in lpfc_cmpl_plogi_plogi_issue()
1037 lpfc_cmpl_logo_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_logo_plogi_issue() argument
1040 return ndlp->nlp_state; in lpfc_cmpl_logo_plogi_issue()
1045 struct lpfc_nodelist *ndlp, void *arg, uint32_t evt) in lpfc_cmpl_reglogin_plogi_issue() argument
1059 return ndlp->nlp_state; in lpfc_cmpl_reglogin_plogi_issue()
1063 lpfc_device_rm_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_device_rm_plogi_issue() argument
1068 if (ndlp->nlp_flag & NLP_NPR_2B_DISC) { in lpfc_device_rm_plogi_issue()
1070 ndlp->nlp_flag |= NLP_NODEV_REMOVE; in lpfc_device_rm_plogi_issue()
1072 return ndlp->nlp_state; in lpfc_device_rm_plogi_issue()
1075 lpfc_els_abort(vport->phba, ndlp); in lpfc_device_rm_plogi_issue()
1077 lpfc_drop_node(vport, ndlp); in lpfc_device_rm_plogi_issue()
1084 struct lpfc_nodelist *ndlp, in lpfc_device_recov_plogi_issue() argument
1095 return ndlp->nlp_state; in lpfc_device_recov_plogi_issue()
1098 lpfc_els_abort(phba, ndlp); in lpfc_device_recov_plogi_issue()
1100 ndlp->nlp_prev_state = NLP_STE_PLOGI_ISSUE; in lpfc_device_recov_plogi_issue()
1101 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_device_recov_plogi_issue()
1103 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_plogi_issue()
1106 return ndlp->nlp_state; in lpfc_device_recov_plogi_issue()
1110 lpfc_rcv_plogi_adisc_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_adisc_issue() argument
1118 lpfc_els_abort(phba, ndlp); in lpfc_rcv_plogi_adisc_issue()
1122 if (lpfc_rcv_plogi(vport, ndlp, cmdiocb)) { in lpfc_rcv_plogi_adisc_issue()
1123 if (ndlp->nlp_flag & NLP_NPR_2B_DISC) { in lpfc_rcv_plogi_adisc_issue()
1125 ndlp->nlp_flag &= ~NLP_NPR_2B_DISC; in lpfc_rcv_plogi_adisc_issue()
1130 return ndlp->nlp_state; in lpfc_rcv_plogi_adisc_issue()
1132 ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE; in lpfc_rcv_plogi_adisc_issue()
1133 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0); in lpfc_rcv_plogi_adisc_issue()
1134 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE); in lpfc_rcv_plogi_adisc_issue()
1136 return ndlp->nlp_state; in lpfc_rcv_plogi_adisc_issue()
1140 lpfc_rcv_prli_adisc_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_adisc_issue() argument
1145 lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp); in lpfc_rcv_prli_adisc_issue()
1146 return ndlp->nlp_state; in lpfc_rcv_prli_adisc_issue()
1150 lpfc_rcv_logo_adisc_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_adisc_issue() argument
1159 lpfc_els_abort(phba, ndlp); in lpfc_rcv_logo_adisc_issue()
1161 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_adisc_issue()
1162 return ndlp->nlp_state; in lpfc_rcv_logo_adisc_issue()
1167 struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc_adisc_issue() argument
1174 lpfc_rcv_padisc(vport, ndlp, cmdiocb); in lpfc_rcv_padisc_adisc_issue()
1175 return ndlp->nlp_state; in lpfc_rcv_padisc_adisc_issue()
1179 lpfc_rcv_prlo_adisc_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prlo_adisc_issue() argument
1187 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_PRLO); in lpfc_rcv_prlo_adisc_issue()
1188 return ndlp->nlp_state; in lpfc_rcv_prlo_adisc_issue()
1193 struct lpfc_nodelist *ndlp, in lpfc_cmpl_adisc_adisc_issue() argument
1210 (!lpfc_check_adisc(vport, ndlp, &ap->nodeName, &ap->portName))) { in lpfc_cmpl_adisc_adisc_issue()
1212 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ); in lpfc_cmpl_adisc_adisc_issue()
1214 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_cmpl_adisc_adisc_issue()
1216 ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; in lpfc_cmpl_adisc_adisc_issue()
1218 memset(&ndlp->nlp_nodename, 0, sizeof(struct lpfc_name)); in lpfc_cmpl_adisc_adisc_issue()
1219 memset(&ndlp->nlp_portname, 0, sizeof(struct lpfc_name)); in lpfc_cmpl_adisc_adisc_issue()
1221 ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE; in lpfc_cmpl_adisc_adisc_issue()
1222 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_cmpl_adisc_adisc_issue()
1223 lpfc_unreg_rpi(vport, ndlp); in lpfc_cmpl_adisc_adisc_issue()
1224 return ndlp->nlp_state; in lpfc_cmpl_adisc_adisc_issue()
1228 rc = lpfc_sli4_resume_rpi(ndlp); in lpfc_cmpl_adisc_adisc_issue()
1231 ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE; in lpfc_cmpl_adisc_adisc_issue()
1232 return ndlp->nlp_state; in lpfc_cmpl_adisc_adisc_issue()
1236 if (ndlp->nlp_type & NLP_FCP_TARGET) { in lpfc_cmpl_adisc_adisc_issue()
1237 ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE; in lpfc_cmpl_adisc_adisc_issue()
1238 lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE); in lpfc_cmpl_adisc_adisc_issue()
1240 ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE; in lpfc_cmpl_adisc_adisc_issue()
1241 lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); in lpfc_cmpl_adisc_adisc_issue()
1244 return ndlp->nlp_state; in lpfc_cmpl_adisc_adisc_issue()
1248 lpfc_device_rm_adisc_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_device_rm_adisc_issue() argument
1253 if (ndlp->nlp_flag & NLP_NPR_2B_DISC) { in lpfc_device_rm_adisc_issue()
1255 ndlp->nlp_flag |= NLP_NODEV_REMOVE; in lpfc_device_rm_adisc_issue()
1257 return ndlp->nlp_state; in lpfc_device_rm_adisc_issue()
1260 lpfc_els_abort(vport->phba, ndlp); in lpfc_device_rm_adisc_issue()
1262 lpfc_drop_node(vport, ndlp); in lpfc_device_rm_adisc_issue()
1269 struct lpfc_nodelist *ndlp, in lpfc_device_recov_adisc_issue() argument
1280 return ndlp->nlp_state; in lpfc_device_recov_adisc_issue()
1283 lpfc_els_abort(phba, ndlp); in lpfc_device_recov_adisc_issue()
1285 ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE; in lpfc_device_recov_adisc_issue()
1286 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_device_recov_adisc_issue()
1288 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_adisc_issue()
1290 lpfc_disc_set_adisc(vport, ndlp); in lpfc_device_recov_adisc_issue()
1291 return ndlp->nlp_state; in lpfc_device_recov_adisc_issue()
1296 struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_reglogin_issue() argument
1302 lpfc_rcv_plogi(vport, ndlp, cmdiocb); in lpfc_rcv_plogi_reglogin_issue()
1303 return ndlp->nlp_state; in lpfc_rcv_plogi_reglogin_issue()
1308 struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_reglogin_issue() argument
1314 lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp); in lpfc_rcv_prli_reglogin_issue()
1315 return ndlp->nlp_state; in lpfc_rcv_prli_reglogin_issue()
1320 struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_reglogin_issue() argument
1335 (ndlp == (struct lpfc_nodelist *) mb->context2)) { in lpfc_rcv_logo_reglogin_issue()
1336 lpfc_nlp_put(ndlp); in lpfc_rcv_logo_reglogin_issue()
1345 (ndlp == (struct lpfc_nodelist *) mb->context2)) { in lpfc_rcv_logo_reglogin_issue()
1351 lpfc_nlp_put(ndlp); in lpfc_rcv_logo_reglogin_issue()
1359 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_reglogin_issue()
1360 return ndlp->nlp_state; in lpfc_rcv_logo_reglogin_issue()
1365 struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc_reglogin_issue() argument
1371 lpfc_rcv_padisc(vport, ndlp, cmdiocb); in lpfc_rcv_padisc_reglogin_issue()
1372 return ndlp->nlp_state; in lpfc_rcv_padisc_reglogin_issue()
1377 struct lpfc_nodelist *ndlp, in lpfc_rcv_prlo_reglogin_issue() argument
1384 lpfc_els_rsp_acc(vport, ELS_CMD_PRLO, cmdiocb, ndlp, NULL); in lpfc_rcv_prlo_reglogin_issue()
1385 return ndlp->nlp_state; in lpfc_rcv_prlo_reglogin_issue()
1390 struct lpfc_nodelist *ndlp, in lpfc_cmpl_reglogin_reglogin_issue() argument
1409 ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; in lpfc_cmpl_reglogin_reglogin_issue()
1410 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_cmpl_reglogin_reglogin_issue()
1411 return ndlp->nlp_state; in lpfc_cmpl_reglogin_reglogin_issue()
1415 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); in lpfc_cmpl_reglogin_reglogin_issue()
1417 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_cmpl_reglogin_reglogin_issue()
1419 ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; in lpfc_cmpl_reglogin_reglogin_issue()
1421 lpfc_issue_els_logo(vport, ndlp, 0); in lpfc_cmpl_reglogin_reglogin_issue()
1422 ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; in lpfc_cmpl_reglogin_reglogin_issue()
1423 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_cmpl_reglogin_reglogin_issue()
1424 return ndlp->nlp_state; in lpfc_cmpl_reglogin_reglogin_issue()
1427 ndlp->nlp_rpi = mb->un.varWords[0]; in lpfc_cmpl_reglogin_reglogin_issue()
1428 ndlp->nlp_flag |= NLP_RPI_REGISTERED; in lpfc_cmpl_reglogin_reglogin_issue()
1431 if (!(ndlp->nlp_type & NLP_FABRIC)) { in lpfc_cmpl_reglogin_reglogin_issue()
1432 ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; in lpfc_cmpl_reglogin_reglogin_issue()
1433 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PRLI_ISSUE); in lpfc_cmpl_reglogin_reglogin_issue()
1434 lpfc_issue_els_prli(vport, ndlp, 0); in lpfc_cmpl_reglogin_reglogin_issue()
1436 ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; in lpfc_cmpl_reglogin_reglogin_issue()
1437 lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); in lpfc_cmpl_reglogin_reglogin_issue()
1439 return ndlp->nlp_state; in lpfc_cmpl_reglogin_reglogin_issue()
1444 struct lpfc_nodelist *ndlp, in lpfc_device_rm_reglogin_issue() argument
1450 if (ndlp->nlp_flag & NLP_NPR_2B_DISC) { in lpfc_device_rm_reglogin_issue()
1452 ndlp->nlp_flag |= NLP_NODEV_REMOVE; in lpfc_device_rm_reglogin_issue()
1454 return ndlp->nlp_state; in lpfc_device_rm_reglogin_issue()
1456 lpfc_drop_node(vport, ndlp); in lpfc_device_rm_reglogin_issue()
1463 struct lpfc_nodelist *ndlp, in lpfc_device_recov_reglogin_issue() argument
1473 return ndlp->nlp_state; in lpfc_device_recov_reglogin_issue()
1475 ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE; in lpfc_device_recov_reglogin_issue()
1476 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_device_recov_reglogin_issue()
1478 ndlp->nlp_flag |= NLP_IGNR_REG_CMPL; in lpfc_device_recov_reglogin_issue()
1479 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_reglogin_issue()
1481 lpfc_disc_set_adisc(vport, ndlp); in lpfc_device_recov_reglogin_issue()
1482 return ndlp->nlp_state; in lpfc_device_recov_reglogin_issue()
1486 lpfc_rcv_plogi_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_prli_issue() argument
1493 lpfc_rcv_plogi(vport, ndlp, cmdiocb); in lpfc_rcv_plogi_prli_issue()
1494 return ndlp->nlp_state; in lpfc_rcv_plogi_prli_issue()
1498 lpfc_rcv_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_prli_issue() argument
1503 lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp); in lpfc_rcv_prli_prli_issue()
1504 return ndlp->nlp_state; in lpfc_rcv_prli_prli_issue()
1508 lpfc_rcv_logo_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_prli_issue() argument
1514 lpfc_els_abort(vport->phba, ndlp); in lpfc_rcv_logo_prli_issue()
1516 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_prli_issue()
1517 return ndlp->nlp_state; in lpfc_rcv_logo_prli_issue()
1521 lpfc_rcv_padisc_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc_prli_issue() argument
1526 lpfc_rcv_padisc(vport, ndlp, cmdiocb); in lpfc_rcv_padisc_prli_issue()
1527 return ndlp->nlp_state; in lpfc_rcv_padisc_prli_issue()
1536 lpfc_rcv_prlo_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prlo_prli_issue() argument
1541 lpfc_els_rsp_acc(vport, ELS_CMD_PRLO, cmdiocb, ndlp, NULL); in lpfc_rcv_prlo_prli_issue()
1542 return ndlp->nlp_state; in lpfc_rcv_prlo_prli_issue()
1546 lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_prli_prli_issue() argument
1565 ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; in lpfc_cmpl_prli_prli_issue()
1566 lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); in lpfc_cmpl_prli_prli_issue()
1567 return ndlp->nlp_state; in lpfc_cmpl_prli_prli_issue()
1571 ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR); in lpfc_cmpl_prli_prli_issue()
1572 ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE; in lpfc_cmpl_prli_prli_issue()
1576 ndlp->nlp_type |= NLP_FCP_INITIATOR; in lpfc_cmpl_prli_prli_issue()
1578 ndlp->nlp_type |= NLP_FCP_TARGET; in lpfc_cmpl_prli_prli_issue()
1580 ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE; in lpfc_cmpl_prli_prli_issue()
1582 if (!(ndlp->nlp_type & NLP_FCP_TARGET) && in lpfc_cmpl_prli_prli_issue()
1587 ndlp->nlp_flag |= NLP_TARGET_REMOVE; in lpfc_cmpl_prli_prli_issue()
1589 lpfc_issue_els_logo(vport, ndlp, 0); in lpfc_cmpl_prli_prli_issue()
1591 ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; in lpfc_cmpl_prli_prli_issue()
1592 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_cmpl_prli_prli_issue()
1593 return ndlp->nlp_state; in lpfc_cmpl_prli_prli_issue()
1596 ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; in lpfc_cmpl_prli_prli_issue()
1597 if (ndlp->nlp_type & NLP_FCP_TARGET) in lpfc_cmpl_prli_prli_issue()
1598 lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE); in lpfc_cmpl_prli_prli_issue()
1600 lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE); in lpfc_cmpl_prli_prli_issue()
1601 return ndlp->nlp_state; in lpfc_cmpl_prli_prli_issue()
1623 lpfc_device_rm_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_device_rm_prli_issue() argument
1628 if (ndlp->nlp_flag & NLP_NPR_2B_DISC) { in lpfc_device_rm_prli_issue()
1630 ndlp->nlp_flag |= NLP_NODEV_REMOVE; in lpfc_device_rm_prli_issue()
1632 return ndlp->nlp_state; in lpfc_device_rm_prli_issue()
1635 lpfc_els_abort(vport->phba, ndlp); in lpfc_device_rm_prli_issue()
1637 lpfc_drop_node(vport, ndlp); in lpfc_device_rm_prli_issue()
1661 struct lpfc_nodelist *ndlp, in lpfc_device_recov_prli_issue() argument
1672 return ndlp->nlp_state; in lpfc_device_recov_prli_issue()
1675 lpfc_els_abort(phba, ndlp); in lpfc_device_recov_prli_issue()
1677 ndlp->nlp_prev_state = NLP_STE_PRLI_ISSUE; in lpfc_device_recov_prli_issue()
1678 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_device_recov_prli_issue()
1680 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_prli_issue()
1682 lpfc_disc_set_adisc(vport, ndlp); in lpfc_device_recov_prli_issue()
1683 return ndlp->nlp_state; in lpfc_device_recov_prli_issue()
1687 lpfc_rcv_plogi_unmap_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_unmap_node() argument
1692 lpfc_rcv_plogi(vport, ndlp, cmdiocb); in lpfc_rcv_plogi_unmap_node()
1693 return ndlp->nlp_state; in lpfc_rcv_plogi_unmap_node()
1697 lpfc_rcv_prli_unmap_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_unmap_node() argument
1702 lpfc_rcv_prli(vport, ndlp, cmdiocb); in lpfc_rcv_prli_unmap_node()
1703 lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp); in lpfc_rcv_prli_unmap_node()
1704 return ndlp->nlp_state; in lpfc_rcv_prli_unmap_node()
1708 lpfc_rcv_logo_unmap_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_unmap_node() argument
1713 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_unmap_node()
1714 return ndlp->nlp_state; in lpfc_rcv_logo_unmap_node()
1718 lpfc_rcv_padisc_unmap_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc_unmap_node() argument
1723 lpfc_rcv_padisc(vport, ndlp, cmdiocb); in lpfc_rcv_padisc_unmap_node()
1724 return ndlp->nlp_state; in lpfc_rcv_padisc_unmap_node()
1728 lpfc_rcv_prlo_unmap_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prlo_unmap_node() argument
1733 lpfc_els_rsp_acc(vport, ELS_CMD_PRLO, cmdiocb, ndlp, NULL); in lpfc_rcv_prlo_unmap_node()
1734 return ndlp->nlp_state; in lpfc_rcv_prlo_unmap_node()
1739 struct lpfc_nodelist *ndlp, in lpfc_device_recov_unmap_node() argument
1745 ndlp->nlp_prev_state = NLP_STE_UNMAPPED_NODE; in lpfc_device_recov_unmap_node()
1746 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_device_recov_unmap_node()
1748 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_unmap_node()
1750 lpfc_disc_set_adisc(vport, ndlp); in lpfc_device_recov_unmap_node()
1752 return ndlp->nlp_state; in lpfc_device_recov_unmap_node()
1756 lpfc_rcv_plogi_mapped_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_mapped_node() argument
1761 lpfc_rcv_plogi(vport, ndlp, cmdiocb); in lpfc_rcv_plogi_mapped_node()
1762 return ndlp->nlp_state; in lpfc_rcv_plogi_mapped_node()
1766 lpfc_rcv_prli_mapped_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_mapped_node() argument
1771 lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp); in lpfc_rcv_prli_mapped_node()
1772 return ndlp->nlp_state; in lpfc_rcv_prli_mapped_node()
1776 lpfc_rcv_logo_mapped_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_mapped_node() argument
1781 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_mapped_node()
1782 return ndlp->nlp_state; in lpfc_rcv_logo_mapped_node()
1787 struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc_mapped_node() argument
1792 lpfc_rcv_padisc(vport, ndlp, cmdiocb); in lpfc_rcv_padisc_mapped_node()
1793 return ndlp->nlp_state; in lpfc_rcv_padisc_mapped_node()
1797 lpfc_rcv_prlo_mapped_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prlo_mapped_node() argument
1805 ndlp->nlp_sid, 0, LPFC_CTX_TGT); in lpfc_rcv_prlo_mapped_node()
1808 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_PRLO); in lpfc_rcv_prlo_mapped_node()
1809 return ndlp->nlp_state; in lpfc_rcv_prlo_mapped_node()
1814 struct lpfc_nodelist *ndlp, in lpfc_device_recov_mapped_node() argument
1820 ndlp->nlp_prev_state = NLP_STE_MAPPED_NODE; in lpfc_device_recov_mapped_node()
1821 lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE); in lpfc_device_recov_mapped_node()
1823 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_mapped_node()
1825 lpfc_disc_set_adisc(vport, ndlp); in lpfc_device_recov_mapped_node()
1826 return ndlp->nlp_state; in lpfc_device_recov_mapped_node()
1830 lpfc_rcv_plogi_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_plogi_npr_node() argument
1837 if (ndlp->nlp_flag & (NLP_LOGO_SND | NLP_LOGO_ACC)) in lpfc_rcv_plogi_npr_node()
1838 return ndlp->nlp_state; in lpfc_rcv_plogi_npr_node()
1839 if (lpfc_rcv_plogi(vport, ndlp, cmdiocb)) { in lpfc_rcv_plogi_npr_node()
1840 lpfc_cancel_retry_delay_tmo(vport, ndlp); in lpfc_rcv_plogi_npr_node()
1842 ndlp->nlp_flag &= ~(NLP_NPR_ADISC | NLP_NPR_2B_DISC); in lpfc_rcv_plogi_npr_node()
1844 } else if (!(ndlp->nlp_flag & NLP_NPR_2B_DISC)) { in lpfc_rcv_plogi_npr_node()
1846 if (!(ndlp->nlp_flag & NLP_DELAY_TMO)) { in lpfc_rcv_plogi_npr_node()
1847 ndlp->nlp_prev_state = NLP_STE_NPR_NODE; in lpfc_rcv_plogi_npr_node()
1848 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE); in lpfc_rcv_plogi_npr_node()
1849 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0); in lpfc_rcv_plogi_npr_node()
1852 return ndlp->nlp_state; in lpfc_rcv_plogi_npr_node()
1856 lpfc_rcv_prli_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prli_npr_node() argument
1866 lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); in lpfc_rcv_prli_npr_node()
1868 if (!(ndlp->nlp_flag & NLP_DELAY_TMO)) { in lpfc_rcv_prli_npr_node()
1869 if (ndlp->nlp_flag & NLP_NPR_ADISC) { in lpfc_rcv_prli_npr_node()
1871 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_rcv_prli_npr_node()
1872 ndlp->nlp_prev_state = NLP_STE_NPR_NODE; in lpfc_rcv_prli_npr_node()
1874 lpfc_nlp_set_state(vport, ndlp, NLP_STE_ADISC_ISSUE); in lpfc_rcv_prli_npr_node()
1875 lpfc_issue_els_adisc(vport, ndlp, 0); in lpfc_rcv_prli_npr_node()
1877 ndlp->nlp_prev_state = NLP_STE_NPR_NODE; in lpfc_rcv_prli_npr_node()
1878 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE); in lpfc_rcv_prli_npr_node()
1879 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0); in lpfc_rcv_prli_npr_node()
1882 return ndlp->nlp_state; in lpfc_rcv_prli_npr_node()
1886 lpfc_rcv_logo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_logo_npr_node() argument
1891 lpfc_rcv_logo(vport, ndlp, cmdiocb, ELS_CMD_LOGO); in lpfc_rcv_logo_npr_node()
1892 return ndlp->nlp_state; in lpfc_rcv_logo_npr_node()
1896 lpfc_rcv_padisc_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_padisc_npr_node() argument
1901 lpfc_rcv_padisc(vport, ndlp, cmdiocb); in lpfc_rcv_padisc_npr_node()
1907 if (!(ndlp->nlp_flag & NLP_DELAY_TMO) && in lpfc_rcv_padisc_npr_node()
1908 !(ndlp->nlp_flag & NLP_NPR_2B_DISC)) { in lpfc_rcv_padisc_npr_node()
1909 if (ndlp->nlp_flag & NLP_NPR_ADISC) { in lpfc_rcv_padisc_npr_node()
1910 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_rcv_padisc_npr_node()
1911 ndlp->nlp_prev_state = NLP_STE_NPR_NODE; in lpfc_rcv_padisc_npr_node()
1912 lpfc_nlp_set_state(vport, ndlp, NLP_STE_ADISC_ISSUE); in lpfc_rcv_padisc_npr_node()
1913 lpfc_issue_els_adisc(vport, ndlp, 0); in lpfc_rcv_padisc_npr_node()
1915 ndlp->nlp_prev_state = NLP_STE_NPR_NODE; in lpfc_rcv_padisc_npr_node()
1916 lpfc_nlp_set_state(vport, ndlp, NLP_STE_PLOGI_ISSUE); in lpfc_rcv_padisc_npr_node()
1917 lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0); in lpfc_rcv_padisc_npr_node()
1920 return ndlp->nlp_state; in lpfc_rcv_padisc_npr_node()
1924 lpfc_rcv_prlo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_rcv_prlo_npr_node() argument
1931 ndlp->nlp_flag |= NLP_LOGO_ACC; in lpfc_rcv_prlo_npr_node()
1934 lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL); in lpfc_rcv_prlo_npr_node()
1936 if ((ndlp->nlp_flag & NLP_DELAY_TMO) == 0) { in lpfc_rcv_prlo_npr_node()
1937 mod_timer(&ndlp->nlp_delayfunc, jiffies + HZ * 1); in lpfc_rcv_prlo_npr_node()
1939 ndlp->nlp_flag |= NLP_DELAY_TMO; in lpfc_rcv_prlo_npr_node()
1940 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_rcv_prlo_npr_node()
1942 ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; in lpfc_rcv_prlo_npr_node()
1945 ndlp->nlp_flag &= ~NLP_NPR_ADISC; in lpfc_rcv_prlo_npr_node()
1948 return ndlp->nlp_state; in lpfc_rcv_prlo_npr_node()
1952 lpfc_cmpl_plogi_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_plogi_npr_node() argument
1963 ndlp->nlp_flag |= NLP_DEFER_RM; in lpfc_cmpl_plogi_npr_node()
1966 return ndlp->nlp_state; in lpfc_cmpl_plogi_npr_node()
1970 lpfc_cmpl_prli_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_prli_npr_node() argument
1980 if (irsp->ulpStatus && (ndlp->nlp_flag & NLP_NODEV_REMOVE)) { in lpfc_cmpl_prli_npr_node()
1981 lpfc_drop_node(vport, ndlp); in lpfc_cmpl_prli_npr_node()
1984 return ndlp->nlp_state; in lpfc_cmpl_prli_npr_node()
1988 lpfc_cmpl_logo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_logo_npr_node() argument
1992 if (ndlp->nlp_DID == Fabric_DID) { in lpfc_cmpl_logo_npr_node()
1997 lpfc_unreg_rpi(vport, ndlp); in lpfc_cmpl_logo_npr_node()
1998 return ndlp->nlp_state; in lpfc_cmpl_logo_npr_node()
2002 lpfc_cmpl_adisc_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_cmpl_adisc_npr_node() argument
2012 if (irsp->ulpStatus && (ndlp->nlp_flag & NLP_NODEV_REMOVE)) { in lpfc_cmpl_adisc_npr_node()
2013 lpfc_drop_node(vport, ndlp); in lpfc_cmpl_adisc_npr_node()
2016 return ndlp->nlp_state; in lpfc_cmpl_adisc_npr_node()
2021 struct lpfc_nodelist *ndlp, in lpfc_cmpl_reglogin_npr_node() argument
2028 ndlp->nlp_rpi = mb->un.varWords[0]; in lpfc_cmpl_reglogin_npr_node()
2029 ndlp->nlp_flag |= NLP_RPI_REGISTERED; in lpfc_cmpl_reglogin_npr_node()
2031 if (ndlp->nlp_flag & NLP_NODEV_REMOVE) { in lpfc_cmpl_reglogin_npr_node()
2032 lpfc_drop_node(vport, ndlp); in lpfc_cmpl_reglogin_npr_node()
2036 return ndlp->nlp_state; in lpfc_cmpl_reglogin_npr_node()
2040 lpfc_device_rm_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_device_rm_npr_node() argument
2045 if (ndlp->nlp_flag & NLP_NPR_2B_DISC) { in lpfc_device_rm_npr_node()
2047 ndlp->nlp_flag |= NLP_NODEV_REMOVE; in lpfc_device_rm_npr_node()
2049 return ndlp->nlp_state; in lpfc_device_rm_npr_node()
2051 lpfc_drop_node(vport, ndlp); in lpfc_device_rm_npr_node()
2056 lpfc_device_recov_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_device_recov_npr_node() argument
2065 return ndlp->nlp_state; in lpfc_device_recov_npr_node()
2067 lpfc_cancel_retry_delay_tmo(vport, ndlp); in lpfc_device_recov_npr_node()
2069 ndlp->nlp_flag &= ~(NLP_NODEV_REMOVE | NLP_NPR_2B_DISC); in lpfc_device_recov_npr_node()
2071 return ndlp->nlp_state; in lpfc_device_recov_npr_node()
2248 lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_disc_state_machine() argument
2256 if (lpfc_nlp_get(ndlp)) in lpfc_disc_state_machine()
2259 cur_state = ndlp->nlp_state; in lpfc_disc_state_machine()
2265 evt, ndlp->nlp_DID, cur_state, ndlp->nlp_flag); in lpfc_disc_state_machine()
2269 evt, cur_state, ndlp->nlp_DID); in lpfc_disc_state_machine()
2272 rc = (func) (vport, ndlp, arg, evt); in lpfc_disc_state_machine()
2278 rc, ndlp->nlp_DID, ndlp->nlp_flag); in lpfc_disc_state_machine()
2282 rc, ndlp->nlp_DID, ndlp->nlp_flag); in lpfc_disc_state_machine()
2284 lpfc_nlp_put(ndlp); in lpfc_disc_state_machine()