Lines Matching refs:vport
157 struct lpfc_vport *vport = ndlp->vport; in lpfc_ct_reject_event() local
158 struct lpfc_hba *phba = vport->phba; in lpfc_ct_reject_event()
241 cmdiocbq->vport = vport; in lpfc_ct_reject_event()
267 lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, in lpfc_ct_reject_event()
269 rc, vport->fc_flag); in lpfc_ct_reject_event()
286 struct lpfc_vport *vport = ctiocbq->vport; in lpfc_ct_handle_mibreq() local
294 lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS, in lpfc_ct_handle_mibreq()
301 if (test_bit(FC_UNLOADING, &vport->load_flag)) in lpfc_ct_handle_mibreq()
304 ndlp = lpfc_findnode_did(vport, did); in lpfc_ct_handle_mibreq()
306 lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS, in lpfc_ct_handle_mibreq()
315 lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS, in lpfc_ct_handle_mibreq()
586 lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, in lpfc_gen_req() argument
593 struct lpfc_hba *phba = vport->phba; in lpfc_gen_req()
628 lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, in lpfc_gen_req()
632 vport->port_state); in lpfc_gen_req()
635 geniocb->vport = vport; in lpfc_gen_req()
664 lpfc_ct_cmd(struct lpfc_vport *vport, struct lpfc_dmabuf *inmp, in lpfc_ct_cmd() argument
670 struct lpfc_hba *phba = vport->phba; in lpfc_ct_cmd()
689 status = lpfc_gen_req(vport, bmp, inmp, outmp, cmpl, ndlp, in lpfc_ct_cmd()
715 lpfc_prep_node_fc4type(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type) in lpfc_prep_node_fc4type() argument
719 if ((vport->port_type != LPFC_NPIV_PORT) || in lpfc_prep_node_fc4type()
720 !(vport->ct_flags & FC_CT_RFF_ID) || !vport->cfg_restrict_login) { in lpfc_prep_node_fc4type()
722 ndlp = lpfc_setup_disc_node(vport, Did); in lpfc_prep_node_fc4type()
725 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_prep_node_fc4type()
727 Did, ndlp->nlp_flag, vport->fc_flag); in lpfc_prep_node_fc4type()
736 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_prep_node_fc4type()
740 ndlp->nlp_state, vport->fc_flag, in lpfc_prep_node_fc4type()
741 vport->fc_rscn_id_cnt); in lpfc_prep_node_fc4type()
749 lpfc_nlp_set_state(vport, ndlp, in lpfc_prep_node_fc4type()
753 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_prep_node_fc4type()
755 Did, vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_prep_node_fc4type()
757 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_prep_node_fc4type()
760 Did, vport->fc_flag, in lpfc_prep_node_fc4type()
761 vport->fc_rscn_id_cnt, ndlp); in lpfc_prep_node_fc4type()
764 if (!test_bit(FC_RSCN_MODE, &vport->fc_flag) || in lpfc_prep_node_fc4type()
765 lpfc_rscn_payload_check(vport, Did)) { in lpfc_prep_node_fc4type()
766 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_prep_node_fc4type()
768 Did, vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_prep_node_fc4type()
774 ndlp = lpfc_findnode_did(vport, Did); in lpfc_prep_node_fc4type()
782 lpfc_setup_disc_node(vport, Did); in lpfc_prep_node_fc4type()
783 } else if (lpfc_ns_cmd(vport, SLI_CTNS_GFF_ID, in lpfc_prep_node_fc4type()
785 vport->num_disc_nodes++; in lpfc_prep_node_fc4type()
787 lpfc_setup_disc_node(vport, Did); in lpfc_prep_node_fc4type()
789 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_prep_node_fc4type()
791 Did, vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_prep_node_fc4type()
793 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_prep_node_fc4type()
796 vport->fc_flag, in lpfc_prep_node_fc4type()
797 vport->fc_rscn_id_cnt); in lpfc_prep_node_fc4type()
803 lpfc_ns_rsp_audit_did(struct lpfc_vport *vport, uint32_t Did, uint8_t fc4_type) in lpfc_ns_rsp_audit_did() argument
805 struct lpfc_hba *phba = vport->phba; in lpfc_ns_rsp_audit_did()
813 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_ns_rsp_audit_did()
822 if (Did != vport->fc_myDID && in lpfc_ns_rsp_audit_did()
824 vport->cfg_peer_port_login)) { in lpfc_ns_rsp_audit_did()
827 lpfc_prep_node_fc4type(vport, Did, fc4_type); in lpfc_ns_rsp_audit_did()
831 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) { in lpfc_ns_rsp_audit_did()
846 lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint8_t fc4_type, in lpfc_ns_rsp() argument
858 lpfc_set_disctmo(vport); in lpfc_ns_rsp()
859 vport->num_disc_nodes = 0; in lpfc_ns_rsp()
860 vport->fc_ns_retry = 0; in lpfc_ns_rsp()
881 lpfc_ns_rsp_audit_did(vport, Did, fc4_type); in lpfc_ns_rsp()
895 if (vport->phba->nvmet_support) { in lpfc_ns_rsp()
896 list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) { in lpfc_ns_rsp()
899 lpfc_disc_state_machine(vport, ndlp, NULL, in lpfc_ns_rsp()
916 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_gid_ft() local
934 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_ft()
936 ulp_status, ulp_word4, vport->fc_ns_retry); in lpfc_cmpl_ct_cmd_gid_ft()
940 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_ft()
946 if (vport == phba->pport && test_bit(FC_UNLOADING, &vport->load_flag)) { in lpfc_cmpl_ct_cmd_gid_ft()
947 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_ft()
948 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
952 if (lpfc_els_chk_latt(vport)) { in lpfc_cmpl_ct_cmd_gid_ft()
953 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_ft()
955 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_ft()
956 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
957 lpfc_vport_set_state(vport, FC_VPORT_FAILED); in lpfc_cmpl_ct_cmd_gid_ft()
960 if (lpfc_error_lost_link(vport, ulp_status, ulp_word4)) { in lpfc_cmpl_ct_cmd_gid_ft()
961 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_ft()
965 ulp_status, ulp_word4, vport->fc_flag, in lpfc_cmpl_ct_cmd_gid_ft()
966 vport->port_state, vport->gidft_inp); in lpfc_cmpl_ct_cmd_gid_ft()
967 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_ft()
968 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
969 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_ft()
970 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_ft()
974 if (test_and_clear_bit(FC_RSCN_DEFERRED, &vport->fc_flag)) { in lpfc_cmpl_ct_cmd_gid_ft()
978 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_ft()
979 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_ft()
985 lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, in lpfc_cmpl_ct_cmd_gid_ft()
987 vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_cmpl_ct_cmd_gid_ft()
988 lpfc_els_handle_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
995 if (vport->fc_ns_retry < LPFC_MAX_NS_RETRY) { in lpfc_cmpl_ct_cmd_gid_ft()
999 vport->fc_ns_retry++; in lpfc_cmpl_ct_cmd_gid_ft()
1001 type = lpfc_get_gidft_type(vport, cmdiocb); in lpfc_cmpl_ct_cmd_gid_ft()
1006 rc = lpfc_ns_cmd(vport, SLI_CTNS_GID_FT, in lpfc_cmpl_ct_cmd_gid_ft()
1007 vport->fc_ns_retry, type); in lpfc_cmpl_ct_cmd_gid_ft()
1011 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_ft()
1012 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_ft()
1015 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_ft()
1016 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
1017 lpfc_vport_set_state(vport, FC_VPORT_FAILED); in lpfc_cmpl_ct_cmd_gid_ft()
1018 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_cmpl_ct_cmd_gid_ft()
1020 ulp_status, vport->fc_ns_retry); in lpfc_cmpl_ct_cmd_gid_ft()
1027 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_ft()
1030 vport->fc_flag, in lpfc_cmpl_ct_cmd_gid_ft()
1032 vport->num_disc_nodes, in lpfc_cmpl_ct_cmd_gid_ft()
1033 vport->gidft_inp, in lpfc_cmpl_ct_cmd_gid_ft()
1036 lpfc_ns_rsp(vport, in lpfc_cmpl_ct_cmd_gid_ft()
1045 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_cmd_gid_ft()
1052 vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_ft()
1054 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_ft()
1060 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_cmd_gid_ft()
1067 vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_ft()
1069 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_ft()
1079 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_cmpl_ct_cmd_gid_ft()
1085 vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_ft()
1087 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_ft()
1093 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_ft()
1094 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_ft()
1097 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_ft()
1099 vport->gidft_inp, vport->num_disc_nodes); in lpfc_cmpl_ct_cmd_gid_ft()
1102 if ((vport->num_disc_nodes == 0) && in lpfc_cmpl_ct_cmd_gid_ft()
1103 (vport->gidft_inp == 0)) { in lpfc_cmpl_ct_cmd_gid_ft()
1109 if (vport->port_state >= LPFC_DISC_AUTH) { in lpfc_cmpl_ct_cmd_gid_ft()
1110 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) { in lpfc_cmpl_ct_cmd_gid_ft()
1111 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
1113 set_bit(FC_RSCN_MODE, &vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_ft()
1115 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_ft()
1119 lpfc_disc_start(vport); in lpfc_cmpl_ct_cmd_gid_ft()
1131 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_gid_pt() local
1149 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_pt()
1152 vport->fc_ns_retry); in lpfc_cmpl_ct_cmd_gid_pt()
1156 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1162 if (vport == phba->pport && test_bit(FC_UNLOADING, &vport->load_flag)) { in lpfc_cmpl_ct_cmd_gid_pt()
1163 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_pt()
1164 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1168 if (lpfc_els_chk_latt(vport)) { in lpfc_cmpl_ct_cmd_gid_pt()
1169 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1171 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_pt()
1172 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1173 lpfc_vport_set_state(vport, FC_VPORT_FAILED); in lpfc_cmpl_ct_cmd_gid_pt()
1176 if (lpfc_error_lost_link(vport, ulp_status, ulp_word4)) { in lpfc_cmpl_ct_cmd_gid_pt()
1177 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1181 ulp_status, ulp_word4, vport->fc_flag, in lpfc_cmpl_ct_cmd_gid_pt()
1182 vport->port_state, vport->gidft_inp); in lpfc_cmpl_ct_cmd_gid_pt()
1183 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_pt()
1184 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1185 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_pt()
1186 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_pt()
1190 if (test_and_clear_bit(FC_RSCN_DEFERRED, &vport->fc_flag)) { in lpfc_cmpl_ct_cmd_gid_pt()
1194 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_pt()
1195 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_pt()
1201 lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, in lpfc_cmpl_ct_cmd_gid_pt()
1203 vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_cmpl_ct_cmd_gid_pt()
1204 lpfc_els_handle_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1211 if (vport->fc_ns_retry < LPFC_MAX_NS_RETRY) { in lpfc_cmpl_ct_cmd_gid_pt()
1215 vport->fc_ns_retry++; in lpfc_cmpl_ct_cmd_gid_pt()
1218 rc = lpfc_ns_cmd(vport, SLI_CTNS_GID_PT, in lpfc_cmpl_ct_cmd_gid_pt()
1219 vport->fc_ns_retry, GID_PT_N_PORT); in lpfc_cmpl_ct_cmd_gid_pt()
1223 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_pt()
1224 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_pt()
1227 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) in lpfc_cmpl_ct_cmd_gid_pt()
1228 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1229 lpfc_vport_set_state(vport, FC_VPORT_FAILED); in lpfc_cmpl_ct_cmd_gid_pt()
1230 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_cmpl_ct_cmd_gid_pt()
1232 ulp_status, vport->fc_ns_retry); in lpfc_cmpl_ct_cmd_gid_pt()
1239 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1242 vport->fc_flag, in lpfc_cmpl_ct_cmd_gid_pt()
1244 vport->num_disc_nodes, in lpfc_cmpl_ct_cmd_gid_pt()
1245 vport->gidft_inp, in lpfc_cmpl_ct_cmd_gid_pt()
1248 lpfc_ns_rsp(vport, in lpfc_cmpl_ct_cmd_gid_pt()
1258 vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1264 vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_pt()
1267 vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_pt()
1274 vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1280 vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_pt()
1283 vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_pt()
1291 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_cmpl_ct_cmd_gid_pt()
1297 vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_pt()
1300 vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gid_pt()
1306 if (vport->gidft_inp) in lpfc_cmpl_ct_cmd_gid_pt()
1307 vport->gidft_inp--; in lpfc_cmpl_ct_cmd_gid_pt()
1310 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gid_pt()
1312 vport->gidft_inp, vport->num_disc_nodes); in lpfc_cmpl_ct_cmd_gid_pt()
1315 if ((vport->num_disc_nodes == 0) && in lpfc_cmpl_ct_cmd_gid_pt()
1316 (vport->gidft_inp == 0)) { in lpfc_cmpl_ct_cmd_gid_pt()
1322 if (vport->port_state >= LPFC_DISC_AUTH) { in lpfc_cmpl_ct_cmd_gid_pt()
1323 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) { in lpfc_cmpl_ct_cmd_gid_pt()
1324 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1326 set_bit(FC_RSCN_MODE, &vport->fc_flag); in lpfc_cmpl_ct_cmd_gid_pt()
1328 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1332 lpfc_disc_start(vport); in lpfc_cmpl_ct_cmd_gid_pt()
1343 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_gff_id() local
1356 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gff_id()
1362 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gff_id()
1372 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gff_id()
1383 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_cmd_gff_id()
1388 vport->fc_rscn_id_cnt); in lpfc_cmpl_ct_cmd_gff_id()
1420 rc = lpfc_ns_cmd(vport, SLI_CTNS_GFF_ID, in lpfc_cmpl_ct_cmd_gff_id()
1431 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_cmpl_ct_cmd_gff_id()
1435 vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_cmpl_ct_cmd_gff_id()
1439 ndlp = lpfc_setup_disc_node(vport, did); in lpfc_cmpl_ct_cmd_gff_id()
1441 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gff_id()
1444 did, ndlp->nlp_flag, vport->fc_flag, in lpfc_cmpl_ct_cmd_gff_id()
1445 vport->fc_rscn_id_cnt); in lpfc_cmpl_ct_cmd_gff_id()
1447 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gff_id()
1450 vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_cmpl_ct_cmd_gff_id()
1454 if (vport->num_disc_nodes) in lpfc_cmpl_ct_cmd_gff_id()
1455 vport->num_disc_nodes--; in lpfc_cmpl_ct_cmd_gff_id()
1457 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gff_id()
1459 vport->gidft_inp, vport->num_disc_nodes); in lpfc_cmpl_ct_cmd_gff_id()
1461 if (vport->num_disc_nodes == 0) { in lpfc_cmpl_ct_cmd_gff_id()
1467 if (vport->port_state >= LPFC_DISC_AUTH) { in lpfc_cmpl_ct_cmd_gff_id()
1468 if (test_bit(FC_RSCN_MODE, &vport->fc_flag)) { in lpfc_cmpl_ct_cmd_gff_id()
1469 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gff_id()
1471 set_bit(FC_RSCN_MODE, &vport->fc_flag); in lpfc_cmpl_ct_cmd_gff_id()
1473 lpfc_els_flush_rscn(vport); in lpfc_cmpl_ct_cmd_gff_id()
1476 lpfc_disc_start(vport); in lpfc_cmpl_ct_cmd_gff_id()
1490 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_gft_id() local
1504 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_cmd_gft_id()
1510 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gft_id()
1521 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gft_id()
1534 ndlp = lpfc_findnode_did(vport, did); in lpfc_cmpl_ct_cmd_gft_id()
1544 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_cmd_gft_id()
1556 lpfc_nlp_set_state(vport, ndlp, in lpfc_cmpl_ct_cmd_gft_id()
1558 lpfc_issue_els_prli(vport, ndlp, 0); in lpfc_cmpl_ct_cmd_gft_id()
1561 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_cmd_gft_id()
1568 lpfc_issue_els_logo(vport, ndlp, 0); in lpfc_cmpl_ct_cmd_gft_id()
1570 lpfc_nlp_set_state(vport, ndlp, in lpfc_cmpl_ct_cmd_gft_id()
1575 lpfc_vlog_msg(vport, KERN_WARNING, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_gft_id()
1587 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct() local
1611 latt = lpfc_els_chk_latt(vport); in lpfc_cmpl_ct()
1614 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct()
1621 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct()
1626 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_cmpl_ct()
1642 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct()
1644 rc = lpfc_ns_cmd(vport, cmdcode, retry, 0); in lpfc_cmpl_ct()
1671 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_rft_id() local
1682 vport->ct_flags |= FC_CT_RFT_ID; in lpfc_cmpl_ct_cmd_rft_id()
1692 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_rnn_id() local
1703 vport->ct_flags |= FC_CT_RNN_ID; in lpfc_cmpl_ct_cmd_rnn_id()
1713 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_rspn_id() local
1724 vport->ct_flags |= FC_CT_RSPN_ID; in lpfc_cmpl_ct_cmd_rspn_id()
1734 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_rsnn_nn() local
1745 vport->ct_flags |= FC_CT_RSNN_NN; in lpfc_cmpl_ct_cmd_rsnn_nn()
1755 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_da_id() local
1758 vport->ct_flags = 0; in lpfc_cmpl_ct_cmd_da_id()
1767 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_rff_id() local
1778 vport->ct_flags |= FC_CT_RFF_ID; in lpfc_cmpl_ct_cmd_rff_id()
1790 lpfc_vport_symbolic_port_name(struct lpfc_vport *vport, char *symbol, in lpfc_vport_symbolic_port_name() argument
1800 n = scnprintf(symbol, size, "%d", vport->phba->brd_no); in lpfc_vport_symbolic_port_name()
1806 lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol, in lpfc_vport_symbolic_node_name() argument
1814 scnprintf(tmp, sizeof(tmp), "Emulex %s", vport->phba->ModelName); in lpfc_vport_symbolic_node_name()
1818 lpfc_decode_firmware_rev(vport->phba, fwrev, 0); in lpfc_vport_symbolic_node_name()
1827 scnprintf(tmp, sizeof(tmp), " HN:%s", vport->phba->os_host_name); in lpfc_vport_symbolic_node_name()
1841 lpfc_find_map_node(struct lpfc_vport *vport) in lpfc_find_map_node() argument
1847 spin_lock_irqsave(&vport->fc_nodes_list_lock, iflags); in lpfc_find_map_node()
1848 list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) { in lpfc_find_map_node()
1855 spin_unlock_irqrestore(&vport->fc_nodes_list_lock, iflags); in lpfc_find_map_node()
1864 lpfc_get_gidft_type(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb) in lpfc_get_gidft_type() argument
1888 lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode, in lpfc_ns_cmd() argument
1892 struct lpfc_hba *phba = vport->phba; in lpfc_ns_cmd()
1903 ndlp = lpfc_findnode_did(vport, NameServer_DID); in lpfc_ns_cmd()
1939 lpfc_printf_vlog(vport, KERN_INFO ,LOG_DISCOVERY, in lpfc_ns_cmd()
1941 cmdcode, vport->fc_flag, vport->fc_rscn_id_cnt, in lpfc_ns_cmd()
1986 if (vport->port_state < LPFC_NS_QRY) in lpfc_ns_cmd()
1987 vport->port_state = LPFC_NS_QRY; in lpfc_ns_cmd()
1988 lpfc_set_disctmo(vport); in lpfc_ns_cmd()
1998 if (vport->port_state < LPFC_NS_QRY) in lpfc_ns_cmd()
1999 vport->port_state = LPFC_NS_QRY; in lpfc_ns_cmd()
2000 lpfc_set_disctmo(vport); in lpfc_ns_cmd()
2020 vport->ct_flags &= ~FC_CT_RFT_ID; in lpfc_ns_cmd()
2023 CtReq->un.rft.port_id = cpu_to_be32(vport->fc_myDID); in lpfc_ns_cmd()
2031 if (vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH || in lpfc_ns_cmd()
2032 vport->cfg_enable_fc4_type == LPFC_ENABLE_FCP) in lpfc_ns_cmd()
2036 if (vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH || in lpfc_ns_cmd()
2037 vport->cfg_enable_fc4_type == LPFC_ENABLE_NVME) in lpfc_ns_cmd()
2041 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_ns_cmd()
2054 vport->ct_flags &= ~FC_CT_RNN_ID; in lpfc_ns_cmd()
2057 CtReq->un.rnn.PortId = cpu_to_be32(vport->fc_myDID); in lpfc_ns_cmd()
2058 memcpy(CtReq->un.rnn.wwnn, &vport->fc_nodename, in lpfc_ns_cmd()
2064 vport->ct_flags &= ~FC_CT_RSPN_ID; in lpfc_ns_cmd()
2067 CtReq->un.rspn.PortId = cpu_to_be32(vport->fc_myDID); in lpfc_ns_cmd()
2070 lpfc_vport_symbolic_port_name(vport, in lpfc_ns_cmd()
2075 vport->ct_flags &= ~FC_CT_RSNN_NN; in lpfc_ns_cmd()
2078 memcpy(CtReq->un.rsnn.wwnn, &vport->fc_nodename, in lpfc_ns_cmd()
2082 lpfc_vport_symbolic_node_name(vport, in lpfc_ns_cmd()
2090 CtReq->un.da_id.port_id = cpu_to_be32(vport->fc_myDID); in lpfc_ns_cmd()
2094 vport->ct_flags &= ~FC_CT_RFF_ID; in lpfc_ns_cmd()
2097 CtReq->un.rff.PortId = cpu_to_be32(vport->fc_myDID); in lpfc_ns_cmd()
2104 if (((vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) || in lpfc_ns_cmd()
2105 (vport->cfg_enable_fc4_type == LPFC_ENABLE_NVME)) && in lpfc_ns_cmd()
2107 if ((vport == phba->pport) && phba->nvmet_support) { in lpfc_ns_cmd()
2112 lpfc_nvme_update_localport(vport); in lpfc_ns_cmd()
2116 } else if (((vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) || in lpfc_ns_cmd()
2117 (vport->cfg_enable_fc4_type == LPFC_ENABLE_FCP)) && in lpfc_ns_cmd()
2125 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_ns_cmd()
2138 if (!lpfc_ct_cmd(vport, mp, bmp, ndlp, cmpl, rsp_size, retry)) { in lpfc_ns_cmd()
2140 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_ns_cmd()
2156 lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT, in lpfc_ns_cmd()
2159 cmdcode, rc, vport->fc_flag, vport->fc_rscn_id_cnt); in lpfc_ns_cmd()
2176 struct lpfc_vport *vport; in lpfc_fdmi_rprt_defer() local
2184 vport = vports[i]; in lpfc_fdmi_rprt_defer()
2188 if (vport->ct_flags & FC_CT_RPRT_DEFER) { in lpfc_fdmi_rprt_defer()
2189 vport->ct_flags &= ~FC_CT_RPRT_DEFER; in lpfc_fdmi_rprt_defer()
2190 vport->fdmi_port_mask = mask; in lpfc_fdmi_rprt_defer()
2191 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, 0); in lpfc_fdmi_rprt_defer()
2211 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_disc_fdmi() local
2223 latt = lpfc_els_chk_latt(vport); in lpfc_cmpl_ct_disc_fdmi()
2224 lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, in lpfc_cmpl_ct_disc_fdmi()
2260 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_cmpl_ct_disc_fdmi()
2271 ndlp = lpfc_findnode_did(vport, FDMI_DID); in lpfc_cmpl_ct_disc_fdmi()
2279 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_ELS, in lpfc_cmpl_ct_disc_fdmi()
2285 if (vport->fdmi_hba_mask == LPFC_FDMI2_HBA_ATTR) { in lpfc_cmpl_ct_disc_fdmi()
2287 vport->fdmi_hba_mask = LPFC_FDMI1_HBA_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2292 vport->fdmi_port_mask = LPFC_FDMI1_PORT_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2294 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA, 0); in lpfc_cmpl_ct_disc_fdmi()
2299 if (vport->port_type != LPFC_PHYSICAL_PORT) { in lpfc_cmpl_ct_disc_fdmi()
2304 if (vport->fdmi_port_mask == LPFC_FDMI2_PORT_ATTR) { in lpfc_cmpl_ct_disc_fdmi()
2306 vport->fdmi_port_mask = LPFC_FDMI1_PORT_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2308 lpfc_fdmi_cmd(vport, ndlp, cmd, 0); in lpfc_cmpl_ct_disc_fdmi()
2311 if (vport->fdmi_port_mask == LPFC_FDMI2_SMART_ATTR) { in lpfc_cmpl_ct_disc_fdmi()
2312 vport->fdmi_port_mask = LPFC_FDMI2_PORT_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2314 lpfc_fdmi_cmd(vport, ndlp, cmd, 0); in lpfc_cmpl_ct_disc_fdmi()
2329 if (vport->fdmi_port_mask == LPFC_FDMI2_PORT_ATTR) { in lpfc_cmpl_ct_disc_fdmi()
2331 vport->fdmi_hba_mask = LPFC_FDMI1_HBA_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2332 vport->fdmi_port_mask = LPFC_FDMI1_PORT_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2334 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA, 0); in lpfc_cmpl_ct_disc_fdmi()
2337 if (vport->fdmi_port_mask == LPFC_FDMI2_SMART_ATTR) { in lpfc_cmpl_ct_disc_fdmi()
2338 vport->fdmi_port_mask = LPFC_FDMI2_PORT_ATTR; in lpfc_cmpl_ct_disc_fdmi()
2340 lpfc_fdmi_cmd(vport, ndlp, cmd, 0); in lpfc_cmpl_ct_disc_fdmi()
2354 lpfc_fdmi_rprt_defer(phba, vport->fdmi_port_mask); in lpfc_cmpl_ct_disc_fdmi()
2356 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPA, 0); in lpfc_cmpl_ct_disc_fdmi()
2360 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DPRT, 0); in lpfc_cmpl_ct_disc_fdmi()
2364 if (vport->port_type == LPFC_PHYSICAL_PORT) { in lpfc_cmpl_ct_disc_fdmi()
2365 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RHBA, 0); in lpfc_cmpl_ct_disc_fdmi()
2376 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, 0); in lpfc_cmpl_ct_disc_fdmi()
2378 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_disc_fdmi()
2381 vport->ct_flags |= FC_CT_RPRT_DEFER; in lpfc_cmpl_ct_disc_fdmi()
2386 if (vport->port_type == LPFC_PHYSICAL_PORT && in lpfc_cmpl_ct_disc_fdmi()
2390 lpfc_printf_vlog(vport, KERN_INFO, in lpfc_cmpl_ct_disc_fdmi()
2404 if (lpfc_fdmi_cmd(vport, ndlp, cmd, in lpfc_cmpl_ct_disc_fdmi()
2434 lpfc_fdmi_change_check(struct lpfc_vport *vport) in lpfc_fdmi_change_check() argument
2436 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_change_check()
2444 if (!test_bit(FC_FABRIC, &vport->fc_flag)) in lpfc_fdmi_change_check()
2447 ndlp = lpfc_findnode_did(vport, FDMI_DID); in lpfc_fdmi_change_check()
2456 lpfc_ns_cmd(vport, SLI_CTNS_RSNN_NN, 0, 0); in lpfc_fdmi_change_check()
2463 if (vport->port_type == LPFC_PHYSICAL_PORT) { in lpfc_fdmi_change_check()
2466 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DHBA, 0); in lpfc_fdmi_change_check()
2471 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_DPRT, 0); in lpfc_fdmi_change_check()
2480 if (!(vport->fdmi_port_mask & LPFC_FDMI_PORT_ATTR_num_disc)) in lpfc_fdmi_change_check()
2484 cnt = lpfc_find_map_node(vport); in lpfc_fdmi_change_check()
2485 if (cnt == vport->fdmi_num_disc) in lpfc_fdmi_change_check()
2488 if (vport->port_type == LPFC_PHYSICAL_PORT) { in lpfc_fdmi_change_check()
2489 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPA, in lpfc_fdmi_change_check()
2495 lpfc_fdmi_cmd(vport, ndlp, SLI_MGMT_RPRT, in lpfc_fdmi_change_check()
2601 lpfc_fdmi_hba_attr_wwnn(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_wwnn() argument
2604 &vport->fc_sparam.nodeName); in lpfc_fdmi_hba_attr_wwnn()
2608 lpfc_fdmi_hba_attr_manufacturer(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_manufacturer() argument
2618 lpfc_fdmi_hba_attr_sn(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_sn() argument
2620 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_sn()
2627 lpfc_fdmi_hba_attr_model(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_model() argument
2629 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_model()
2636 lpfc_fdmi_hba_attr_description(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_description() argument
2638 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_description()
2645 lpfc_fdmi_hba_attr_hdw_ver(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_hdw_ver() argument
2647 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_hdw_ver()
2657 lpfc_fdmi_hba_attr_drvr_ver(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_drvr_ver() argument
2664 lpfc_fdmi_hba_attr_rom_ver(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_rom_ver() argument
2666 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_rom_ver()
2681 lpfc_fdmi_hba_attr_fmw_ver(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_fmw_ver() argument
2683 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_fmw_ver()
2692 lpfc_fdmi_hba_attr_os_ver(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_os_ver() argument
2705 lpfc_fdmi_hba_attr_ct_len(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_ct_len() argument
2712 lpfc_fdmi_hba_attr_symbolic_name(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_symbolic_name() argument
2716 lpfc_vport_symbolic_node_name(vport, buf, sizeof(buf)); in lpfc_fdmi_hba_attr_symbolic_name()
2722 lpfc_fdmi_hba_attr_vendor_info(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_vendor_info() argument
2728 lpfc_fdmi_hba_attr_num_ports(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_num_ports() argument
2735 lpfc_fdmi_hba_attr_fabric_wwnn(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_fabric_wwnn() argument
2738 &vport->fabric_nodename); in lpfc_fdmi_hba_attr_fabric_wwnn()
2742 lpfc_fdmi_hba_attr_bios_ver(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_bios_ver() argument
2744 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_hba_attr_bios_ver()
2751 lpfc_fdmi_hba_attr_bios_state(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_bios_state() argument
2758 lpfc_fdmi_hba_attr_vendor_id(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_hba_attr_vendor_id() argument
2768 lpfc_fdmi_port_attr_fc4type(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_fc4type() argument
2770 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_port_attr_fc4type()
2776 if ((phba->sli_rev == LPFC_SLI_REV4) && (vport == phba->pport) && in lpfc_fdmi_port_attr_fc4type()
2785 lpfc_fdmi_port_attr_support_speed(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_support_speed() argument
2787 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_port_attr_support_speed()
2861 lpfc_fdmi_port_attr_speed(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_speed() argument
2863 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_port_attr_speed()
2926 lpfc_fdmi_port_attr_max_frame(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_max_frame() argument
2928 struct serv_parm *hsp = (struct serv_parm *)&vport->fc_sparam; in lpfc_fdmi_port_attr_max_frame()
2936 lpfc_fdmi_port_attr_os_devname(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_os_devname() argument
2938 struct Scsi_Host *shost = lpfc_shost_from_vport(vport); in lpfc_fdmi_port_attr_os_devname()
2948 lpfc_fdmi_port_attr_host_name(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_host_name() argument
2952 scnprintf(buf, sizeof(buf), "%s", vport->phba->os_host_name); in lpfc_fdmi_port_attr_host_name()
2958 lpfc_fdmi_port_attr_wwnn(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_wwnn() argument
2961 &vport->fc_sparam.nodeName); in lpfc_fdmi_port_attr_wwnn()
2965 lpfc_fdmi_port_attr_wwpn(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_wwpn() argument
2968 &vport->fc_sparam.portName); in lpfc_fdmi_port_attr_wwpn()
2972 lpfc_fdmi_port_attr_symbolic_name(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_symbolic_name() argument
2976 lpfc_vport_symbolic_port_name(vport, buf, sizeof(buf)); in lpfc_fdmi_port_attr_symbolic_name()
2982 lpfc_fdmi_port_attr_port_type(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_port_type() argument
2984 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_port_attr_port_type()
2993 lpfc_fdmi_port_attr_class(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_class() argument
3000 lpfc_fdmi_port_attr_fabric_wwpn(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_fabric_wwpn() argument
3003 &vport->fabric_portname); in lpfc_fdmi_port_attr_fabric_wwpn()
3007 lpfc_fdmi_port_attr_active_fc4type(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_active_fc4type() argument
3009 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_port_attr_active_fc4type()
3015 if (vport == phba->pport && in lpfc_fdmi_port_attr_active_fc4type()
3024 lpfc_fdmi_port_attr_port_state(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_port_state() argument
3031 lpfc_fdmi_port_attr_num_disc(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_num_disc() argument
3033 vport->fdmi_num_disc = lpfc_find_map_node(vport); in lpfc_fdmi_port_attr_num_disc()
3036 vport->fdmi_num_disc); in lpfc_fdmi_port_attr_num_disc()
3040 lpfc_fdmi_port_attr_nportid(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_port_attr_nportid() argument
3042 return lpfc_fdmi_set_attr_u32(attr, RPRT_PORT_ID, vport->fc_myDID); in lpfc_fdmi_port_attr_nportid()
3046 lpfc_fdmi_smart_attr_service(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_service() argument
3053 lpfc_fdmi_smart_attr_guid(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_guid() argument
3056 &vport->fc_sparam.nodeName, in lpfc_fdmi_smart_attr_guid()
3057 &vport->fc_sparam.portName); in lpfc_fdmi_smart_attr_guid()
3061 lpfc_fdmi_smart_attr_version(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_version() argument
3068 lpfc_fdmi_smart_attr_model(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_model() argument
3070 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_smart_attr_model()
3077 lpfc_fdmi_smart_attr_port_info(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_port_info() argument
3082 (vport->vpi) ? 2 /* NPIV */ : 1 /* Physical */); in lpfc_fdmi_smart_attr_port_info()
3086 lpfc_fdmi_smart_attr_qos(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_qos() argument
3092 lpfc_fdmi_smart_attr_security(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_smart_attr_security() argument
3098 lpfc_fdmi_vendor_attr_mi(struct lpfc_vport *vport, void *attr) in lpfc_fdmi_vendor_attr_mi() argument
3100 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_vendor_attr_mi()
3110 (struct lpfc_vport *vport, void *attrbuf) = {
3134 (struct lpfc_vport *vport, void *attrbuf) = {
3172 lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, in lpfc_fdmi_cmd() argument
3175 struct lpfc_hba *phba = vport->phba; in lpfc_fdmi_cmd()
3187 int (*func)(struct lpfc_vport *vport, void *attrbuf); in lpfc_fdmi_cmd()
3223 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_fdmi_cmd()
3225 cmdcode, new_mask, vport->fdmi_port_mask, in lpfc_fdmi_cmd()
3226 vport->fc_flag, vport->port_state); in lpfc_fdmi_cmd()
3269 mask = vport->fdmi_hba_mask; in lpfc_fdmi_cmd()
3275 addsz = func(vport, ((uint8_t *)rh + size)); in lpfc_fdmi_cmd()
3295 if (vport->port_type != LPFC_PHYSICAL_PORT) { in lpfc_fdmi_cmd()
3319 (uint8_t *)&vport->fc_sparam.portName, in lpfc_fdmi_cmd()
3329 mask = vport->fdmi_port_mask; in lpfc_fdmi_cmd()
3335 addsz = func(vport, ((uint8_t *)base + size)); in lpfc_fdmi_cmd()
3361 (uint8_t *)&vport->fc_sparam.portName, in lpfc_fdmi_cmd()
3371 if (vport->port_type != LPFC_PHYSICAL_PORT) { in lpfc_fdmi_cmd()
3380 (uint8_t *)&vport->fc_sparam.portName, in lpfc_fdmi_cmd()
3388 lpfc_printf_vlog(vport, KERN_WARNING, LOG_DISCOVERY, in lpfc_fdmi_cmd()
3406 if (!lpfc_ct_cmd(vport, rq, rsp, ndlp, cmpl, rsp_size, 0)) in lpfc_fdmi_cmd()
3419 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_fdmi_cmd()
3435 struct lpfc_vport *vport = from_timer(vport, t, delayed_disc_tmo); in lpfc_delayed_disc_tmo() local
3436 struct lpfc_hba *phba = vport->phba; in lpfc_delayed_disc_tmo()
3440 spin_lock_irqsave(&vport->work_port_lock, iflag); in lpfc_delayed_disc_tmo()
3441 tmo_posted = vport->work_port_events & WORKER_DELAYED_DISC_TMO; in lpfc_delayed_disc_tmo()
3443 vport->work_port_events |= WORKER_DELAYED_DISC_TMO; in lpfc_delayed_disc_tmo()
3444 spin_unlock_irqrestore(&vport->work_port_lock, iflag); in lpfc_delayed_disc_tmo()
3459 lpfc_delayed_disc_timeout_handler(struct lpfc_vport *vport) in lpfc_delayed_disc_timeout_handler() argument
3461 if (!test_and_clear_bit(FC_DISC_DELAYED, &vport->fc_flag)) in lpfc_delayed_disc_timeout_handler()
3464 lpfc_do_scr_ns_plogi(vport->phba, vport); in lpfc_delayed_disc_timeout_handler()
3557 struct lpfc_vport *vport = cmdiocb->vport; in lpfc_cmpl_ct_cmd_vmid() local
3574 if (lpfc_els_chk_latt(vport) || get_job_ulpstatus(phba, rspiocb)) { in lpfc_cmpl_ct_cmd_vmid()
3581 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_vmid()
3591 &vport->load_flag); in lpfc_cmpl_ct_cmd_vmid()
3599 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_vmid()
3610 vmp = lpfc_get_vmid_from_hashtable(vport, hash, in lpfc_cmpl_ct_cmd_vmid()
3613 write_lock(&vport->vmid_lock); in lpfc_cmpl_ct_cmd_vmid()
3617 write_unlock(&vport->vmid_lock); in lpfc_cmpl_ct_cmd_vmid()
3619 vport->vmid_flag |= LPFC_VMID_IN_USE; in lpfc_cmpl_ct_cmd_vmid()
3621 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_vmid()
3628 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_vmid()
3634 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_vmid()
3636 read_lock(&vport->vmid_lock); in lpfc_cmpl_ct_cmd_vmid()
3638 vmp = &vport->vmid[i]; in lpfc_cmpl_ct_cmd_vmid()
3642 read_unlock(&vport->vmid_lock); in lpfc_cmpl_ct_cmd_vmid()
3644 if (!hash_empty(vport->hash_table)) in lpfc_cmpl_ct_cmd_vmid()
3645 hash_for_each(vport->hash_table, bucket, cur, hnode) in lpfc_cmpl_ct_cmd_vmid()
3647 set_bit(FC_ALLOW_VMID, &vport->load_flag); in lpfc_cmpl_ct_cmd_vmid()
3650 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_cmpl_ct_cmd_vmid()
3667 lpfc_vmid_cmd(struct lpfc_vport *vport, in lpfc_vmid_cmd() argument
3670 struct lpfc_hba *phba = vport->phba; in lpfc_vmid_cmd()
3685 ndlp = lpfc_findnode_did(vport, FDMI_DID); in lpfc_vmid_cmd()
3713 lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, in lpfc_vmid_cmd()
3715 vport->fc_flag, vport->port_state, cmdcode); in lpfc_vmid_cmd()
3732 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_vmid_cmd()
3734 ctreq->un.PortID = cpu_to_be32(vport->fc_myDID); in lpfc_vmid_cmd()
3746 ctreq->un.PortID = cpu_to_be32(vport->fc_myDID); in lpfc_vmid_cmd()
3751 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_vmid_cmd()
3753 ctreq->un.PortID = cpu_to_be32(vport->fc_myDID); in lpfc_vmid_cmd()
3761 write_lock(&vport->vmid_lock); in lpfc_vmid_cmd()
3763 write_unlock(&vport->vmid_lock); in lpfc_vmid_cmd()
3768 ctreq->un.PortID = cpu_to_be32(vport->fc_myDID); in lpfc_vmid_cmd()
3773 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_vmid_cmd()
3790 if (!lpfc_ct_cmd(vport, mp, bmp, ndlp, cmpl, rsp_size, retry)) in lpfc_vmid_cmd()
3804 lpfc_printf_vlog(vport, KERN_DEBUG, LOG_DISCOVERY, in lpfc_vmid_cmd()