Lines Matching refs:port

54 static void     bfa_fcs_lport_send_ls_rjt(struct bfa_fcs_lport_s *port,
57 static void bfa_fcs_lport_plogi(struct bfa_fcs_lport_s *port,
59 static void bfa_fcs_lport_online_actions(struct bfa_fcs_lport_s *port);
60 static void bfa_fcs_lport_offline_actions(struct bfa_fcs_lport_s *port);
61 static void bfa_fcs_lport_unknown_init(struct bfa_fcs_lport_s *port);
62 static void bfa_fcs_lport_unknown_online(struct bfa_fcs_lport_s *port);
63 static void bfa_fcs_lport_unknown_offline(struct bfa_fcs_lport_s *port);
64 static void bfa_fcs_lport_deleted(struct bfa_fcs_lport_s *port);
65 static void bfa_fcs_lport_echo(struct bfa_fcs_lport_s *port,
68 static void bfa_fcs_lport_rnid(struct bfa_fcs_lport_s *port,
71 static void bfa_fs_port_get_gen_topo_data(struct bfa_fcs_lport_s *port,
74 static void bfa_fcs_lport_fab_init(struct bfa_fcs_lport_s *port);
75 static void bfa_fcs_lport_fab_online(struct bfa_fcs_lport_s *port);
76 static void bfa_fcs_lport_fab_offline(struct bfa_fcs_lport_s *port);
78 static void bfa_fcs_lport_n2n_init(struct bfa_fcs_lport_s *port);
79 static void bfa_fcs_lport_n2n_online(struct bfa_fcs_lport_s *port);
80 static void bfa_fcs_lport_n2n_offline(struct bfa_fcs_lport_s *port);
82 static void bfa_fcs_lport_loop_init(struct bfa_fcs_lport_s *port);
83 static void bfa_fcs_lport_loop_online(struct bfa_fcs_lport_s *port);
84 static void bfa_fcs_lport_loop_offline(struct bfa_fcs_lport_s *port);
87 void (*init) (struct bfa_fcs_lport_s *port);
88 void (*online) (struct bfa_fcs_lport_s *port);
89 void (*offline) (struct bfa_fcs_lport_s *port);
115 static void bfa_fcs_lport_sm_uninit(struct bfa_fcs_lport_s *port,
117 static void bfa_fcs_lport_sm_init(struct bfa_fcs_lport_s *port,
119 static void bfa_fcs_lport_sm_online(struct bfa_fcs_lport_s *port,
121 static void bfa_fcs_lport_sm_offline(struct bfa_fcs_lport_s *port,
123 static void bfa_fcs_lport_sm_deleting(struct bfa_fcs_lport_s *port,
125 static void bfa_fcs_lport_sm_stopping(struct bfa_fcs_lport_s *port,
130 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_sm_uninit() argument
133 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_sm_uninit()
134 bfa_trc(port->fcs, event); in bfa_fcs_lport_sm_uninit()
138 bfa_sm_set_state(port, bfa_fcs_lport_sm_init); in bfa_fcs_lport_sm_uninit()
142 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_sm_uninit()
147 bfa_fcs_lport_sm_init(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_sm_init() argument
150 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_sm_init()
151 bfa_trc(port->fcs, event); in bfa_fcs_lport_sm_init()
155 bfa_sm_set_state(port, bfa_fcs_lport_sm_online); in bfa_fcs_lport_sm_init()
156 bfa_fcs_lport_online_actions(port); in bfa_fcs_lport_sm_init()
160 bfa_sm_set_state(port, bfa_fcs_lport_sm_uninit); in bfa_fcs_lport_sm_init()
161 bfa_fcs_lport_deleted(port); in bfa_fcs_lport_sm_init()
166 if (port->vport) in bfa_fcs_lport_sm_init()
167 bfa_fcs_vport_stop_comp(port->vport); in bfa_fcs_lport_sm_init()
169 bfa_wc_down(&(port->fabric->stop_wc)); in bfa_fcs_lport_sm_init()
176 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_sm_init()
182 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_sm_online() argument
188 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_sm_online()
189 bfa_trc(port->fcs, event); in bfa_fcs_lport_sm_online()
193 bfa_sm_set_state(port, bfa_fcs_lport_sm_offline); in bfa_fcs_lport_sm_online()
194 bfa_fcs_lport_offline_actions(port); in bfa_fcs_lport_sm_online()
198 __port_action[port->fabric->fab_type].offline(port); in bfa_fcs_lport_sm_online()
200 if (port->num_rports == 0) { in bfa_fcs_lport_sm_online()
201 bfa_sm_set_state(port, bfa_fcs_lport_sm_init); in bfa_fcs_lport_sm_online()
203 if (port->vport) in bfa_fcs_lport_sm_online()
204 bfa_fcs_vport_stop_comp(port->vport); in bfa_fcs_lport_sm_online()
206 bfa_wc_down(&(port->fabric->stop_wc)); in bfa_fcs_lport_sm_online()
208 bfa_sm_set_state(port, bfa_fcs_lport_sm_stopping); in bfa_fcs_lport_sm_online()
209 list_for_each_safe(qe, qen, &port->rport_q) { in bfa_fcs_lport_sm_online()
218 __port_action[port->fabric->fab_type].offline(port); in bfa_fcs_lport_sm_online()
220 if (port->num_rports == 0) { in bfa_fcs_lport_sm_online()
221 bfa_sm_set_state(port, bfa_fcs_lport_sm_uninit); in bfa_fcs_lport_sm_online()
222 bfa_fcs_lport_deleted(port); in bfa_fcs_lport_sm_online()
224 bfa_sm_set_state(port, bfa_fcs_lport_sm_deleting); in bfa_fcs_lport_sm_online()
225 list_for_each_safe(qe, qen, &port->rport_q) { in bfa_fcs_lport_sm_online()
236 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_sm_online()
242 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_sm_offline() argument
248 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_sm_offline()
249 bfa_trc(port->fcs, event); in bfa_fcs_lport_sm_offline()
253 bfa_sm_set_state(port, bfa_fcs_lport_sm_online); in bfa_fcs_lport_sm_offline()
254 bfa_fcs_lport_online_actions(port); in bfa_fcs_lport_sm_offline()
258 if (port->num_rports == 0) { in bfa_fcs_lport_sm_offline()
259 bfa_sm_set_state(port, bfa_fcs_lport_sm_init); in bfa_fcs_lport_sm_offline()
261 if (port->vport) in bfa_fcs_lport_sm_offline()
262 bfa_fcs_vport_stop_comp(port->vport); in bfa_fcs_lport_sm_offline()
264 bfa_wc_down(&(port->fabric->stop_wc)); in bfa_fcs_lport_sm_offline()
266 bfa_sm_set_state(port, bfa_fcs_lport_sm_stopping); in bfa_fcs_lport_sm_offline()
267 list_for_each_safe(qe, qen, &port->rport_q) { in bfa_fcs_lport_sm_offline()
275 if (port->num_rports == 0) { in bfa_fcs_lport_sm_offline()
276 bfa_sm_set_state(port, bfa_fcs_lport_sm_uninit); in bfa_fcs_lport_sm_offline()
277 bfa_fcs_lport_deleted(port); in bfa_fcs_lport_sm_offline()
279 bfa_sm_set_state(port, bfa_fcs_lport_sm_deleting); in bfa_fcs_lport_sm_offline()
280 list_for_each_safe(qe, qen, &port->rport_q) { in bfa_fcs_lport_sm_offline()
292 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_sm_offline()
297 bfa_fcs_lport_sm_stopping(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_sm_stopping() argument
300 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_sm_stopping()
301 bfa_trc(port->fcs, event); in bfa_fcs_lport_sm_stopping()
305 if (port->num_rports == 0) { in bfa_fcs_lport_sm_stopping()
306 bfa_sm_set_state(port, bfa_fcs_lport_sm_init); in bfa_fcs_lport_sm_stopping()
308 if (port->vport) in bfa_fcs_lport_sm_stopping()
309 bfa_fcs_vport_stop_comp(port->vport); in bfa_fcs_lport_sm_stopping()
311 bfa_wc_down(&(port->fabric->stop_wc)); in bfa_fcs_lport_sm_stopping()
316 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_sm_stopping()
322 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_sm_deleting() argument
325 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_sm_deleting()
326 bfa_trc(port->fcs, event); in bfa_fcs_lport_sm_deleting()
330 if (port->num_rports == 0) { in bfa_fcs_lport_sm_deleting()
331 bfa_sm_set_state(port, bfa_fcs_lport_sm_uninit); in bfa_fcs_lport_sm_deleting()
332 bfa_fcs_lport_deleted(port); in bfa_fcs_lport_sm_deleting()
337 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_sm_deleting()
349 bfa_fcs_lport_aen_post(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_aen_post() argument
352 struct bfad_s *bfad = (struct bfad_s *)port->fabric->fcs->bfad; in bfa_fcs_lport_aen_post()
359 aen_entry->aen_data.lport.vf_id = port->fabric->vf_id; in bfa_fcs_lport_aen_post()
360 aen_entry->aen_data.lport.roles = port->port_cfg.roles; in bfa_fcs_lport_aen_post()
362 bfa_fcs_get_base_port(port->fcs)); in bfa_fcs_lport_aen_post()
363 aen_entry->aen_data.lport.lpwwn = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_aen_post()
366 bfad_im_post_vendor_event(aen_entry, bfad, ++port->fcs->fcs_aen_seq, in bfa_fcs_lport_aen_post()
374 bfa_fcs_lport_send_ls_rjt(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, in bfa_fcs_lport_send_ls_rjt() argument
382 bfa_trc(port->fcs, rx_fchs->d_id); in bfa_fcs_lport_send_ls_rjt()
383 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_send_ls_rjt()
385 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_send_ls_rjt()
390 rx_fchs->s_id, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_send_ls_rjt()
393 bfa_fcxp_send(fcxp, bfa_rport, port->fabric->vf_id, port->lp_tag, in bfa_fcs_lport_send_ls_rjt()
402 bfa_fcs_lport_send_fcgs_rjt(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_send_fcgs_rjt() argument
412 bfa_trc(port->fcs, rx_fchs->d_id); in bfa_fcs_lport_send_fcgs_rjt()
413 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_send_fcgs_rjt()
415 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_send_fcgs_rjt()
424 bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_send_fcgs_rjt()
427 bfa_fcxp_send(fcxp, bfa_rport, port->fabric->vf_id, port->lp_tag, in bfa_fcs_lport_send_fcgs_rjt()
436 bfa_fcs_lport_plogi(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_plogi() argument
441 bfa_trc(port->fcs, rx_fchs->d_id); in bfa_fcs_lport_plogi()
442 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_plogi()
447 if (__fcs_min_cfg(port->fcs)) { in bfa_fcs_lport_plogi()
448 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_plogi()
453 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_plogi()
457 bfa_fcs_lport_send_ls_rjt(port, rx_fchs, in bfa_fcs_lport_plogi()
466 if ((!bfa_fcs_fabric_is_switched(port->fabric)) && in bfa_fcs_lport_plogi()
467 (memcmp((void *)&bfa_fcs_lport_get_pwwn(port), in bfa_fcs_lport_plogi()
471 bfa_fcs_lport_send_ls_rjt(port, rx_fchs, in bfa_fcs_lport_plogi()
476 port->pid = rx_fchs->d_id; in bfa_fcs_lport_plogi()
477 bfa_lps_set_n2n_pid(port->fabric->lps, rx_fchs->d_id); in bfa_fcs_lport_plogi()
483 rport = bfa_fcs_lport_get_rport_by_pwwn(port, plogi->port_name); in bfa_fcs_lport_plogi()
488 if ((!bfa_fcs_fabric_is_switched(port->fabric)) && in bfa_fcs_lport_plogi()
489 (memcmp((void *)&bfa_fcs_lport_get_pwwn(port), in bfa_fcs_lport_plogi()
491 port->pid = rx_fchs->d_id; in bfa_fcs_lport_plogi()
492 bfa_lps_set_n2n_pid(port->fabric->lps, rx_fchs->d_id); in bfa_fcs_lport_plogi()
502 rport = bfa_fcs_lport_get_rport_by_pid(port, rx_fchs->s_id); in bfa_fcs_lport_plogi()
507 bfa_fcs_rport_plogi_create(port, rx_fchs, plogi); in bfa_fcs_lport_plogi()
525 bfa_fcs_rport_plogi_create(port, rx_fchs, plogi); in bfa_fcs_lport_plogi()
541 bfa_fcs_lport_echo(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, in bfa_fcs_lport_echo() argument
549 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_echo()
550 bfa_trc(port->fcs, rx_fchs->d_id); in bfa_fcs_lport_echo()
552 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_echo()
557 rx_fchs->s_id, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_echo()
564 bfa_trc(port->fcs, rx_len); in bfa_fcs_lport_echo()
565 bfa_trc(port->fcs, pyld_len); in bfa_fcs_lport_echo()
572 bfa_fcxp_send(fcxp, bfa_rport, port->fabric->vf_id, port->lp_tag, in bfa_fcs_lport_echo()
582 bfa_fcs_lport_rnid(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs, in bfa_fcs_lport_rnid() argument
593 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_rnid()
594 bfa_trc(port->fcs, rx_fchs->d_id); in bfa_fcs_lport_rnid()
595 bfa_trc(port->fcs, rx_len); in bfa_fcs_lport_rnid()
597 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_rnid()
607 bfa_trc(port->fcs, rnid->node_id_data_format); in bfa_fcs_lport_rnid()
613 bfa_fs_port_get_gen_topo_data(port, &gen_topo_data); in bfa_fcs_lport_rnid()
621 common_id_data.port_name = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_rnid()
622 common_id_data.node_name = bfa_fcs_lport_get_nwwn(port); in bfa_fcs_lport_rnid()
625 rx_fchs->s_id, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_rnid()
629 bfa_fcxp_send(fcxp, bfa_rport, port->fabric->vf_id, port->lp_tag, in bfa_fcs_lport_rnid()
638 bfa_fs_port_get_gen_topo_data(struct bfa_fcs_lport_s *port, in bfa_fs_port_get_gen_topo_data() argument
650 bfa_fcs_lport_online_actions(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_online_actions() argument
652 struct bfad_s *bfad = (struct bfad_s *)port->fcs->bfad; in bfa_fcs_lport_online_actions()
655 bfa_trc(port->fcs, port->fabric->oper_type); in bfa_fcs_lport_online_actions()
657 __port_action[port->fabric->fab_type].init(port); in bfa_fcs_lport_online_actions()
658 __port_action[port->fabric->fab_type].online(port); in bfa_fcs_lport_online_actions()
660 wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port)); in bfa_fcs_lport_online_actions()
664 bfa_fcs_lport_aen_post(port, BFA_LPORT_AEN_ONLINE); in bfa_fcs_lport_online_actions()
670 bfa_fcs_lport_offline_actions(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_offline_actions() argument
674 struct bfad_s *bfad = (struct bfad_s *)port->fcs->bfad; in bfa_fcs_lport_offline_actions()
677 bfa_trc(port->fcs, port->fabric->oper_type); in bfa_fcs_lport_offline_actions()
679 __port_action[port->fabric->fab_type].offline(port); in bfa_fcs_lport_offline_actions()
681 wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port)); in bfa_fcs_lport_offline_actions()
682 if (bfa_sm_cmp_state(port->fabric, in bfa_fcs_lport_offline_actions()
687 bfa_fcs_lport_aen_post(port, BFA_LPORT_AEN_DISCONNECT); in bfa_fcs_lport_offline_actions()
692 bfa_fcs_lport_aen_post(port, BFA_LPORT_AEN_OFFLINE); in bfa_fcs_lport_offline_actions()
695 list_for_each_safe(qe, qen, &port->rport_q) { in bfa_fcs_lport_offline_actions()
702 bfa_fcs_lport_unknown_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_unknown_init() argument
708 bfa_fcs_lport_unknown_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_unknown_online() argument
714 bfa_fcs_lport_unknown_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_unknown_offline() argument
720 bfa_fcs_lport_abts_acc(struct bfa_fcs_lport_s *port, struct fchs_s *rx_fchs) in bfa_fcs_lport_abts_acc() argument
726 bfa_trc(port->fcs, rx_fchs->d_id); in bfa_fcs_lport_abts_acc()
727 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_abts_acc()
729 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_abts_acc()
734 rx_fchs->s_id, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_abts_acc()
737 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, in bfa_fcs_lport_abts_acc()
742 bfa_fcs_lport_deleted(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_deleted() argument
744 struct bfad_s *bfad = (struct bfad_s *)port->fcs->bfad; in bfa_fcs_lport_deleted()
747 wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port)); in bfa_fcs_lport_deleted()
751 bfa_fcs_lport_aen_post(port, BFA_LPORT_AEN_DELETE); in bfa_fcs_lport_deleted()
754 if (port->vport) in bfa_fcs_lport_deleted()
755 bfa_fcs_vport_delete_comp(port->vport); in bfa_fcs_lport_deleted()
757 bfa_wc_down(&port->fabric->wc); in bfa_fcs_lport_deleted()
896 bfa_fcs_lport_get_rport_by_pid(struct bfa_fcs_lport_s *port, u32 pid) in bfa_fcs_lport_get_rport_by_pid() argument
901 list_for_each(qe, &port->rport_q) { in bfa_fcs_lport_get_rport_by_pid()
907 bfa_trc(port->fcs, pid); in bfa_fcs_lport_get_rport_by_pid()
915 bfa_fcs_lport_get_rport_by_old_pid(struct bfa_fcs_lport_s *port, u32 pid) in bfa_fcs_lport_get_rport_by_old_pid() argument
920 list_for_each(qe, &port->rport_q) { in bfa_fcs_lport_get_rport_by_old_pid()
926 bfa_trc(port->fcs, pid); in bfa_fcs_lport_get_rport_by_old_pid()
934 bfa_fcs_lport_get_rport_by_pwwn(struct bfa_fcs_lport_s *port, wwn_t pwwn) in bfa_fcs_lport_get_rport_by_pwwn() argument
939 list_for_each(qe, &port->rport_q) { in bfa_fcs_lport_get_rport_by_pwwn()
945 bfa_trc(port->fcs, pwwn); in bfa_fcs_lport_get_rport_by_pwwn()
953 bfa_fcs_lport_get_rport_by_nwwn(struct bfa_fcs_lport_s *port, wwn_t nwwn) in bfa_fcs_lport_get_rport_by_nwwn() argument
958 list_for_each(qe, &port->rport_q) { in bfa_fcs_lport_get_rport_by_nwwn()
964 bfa_trc(port->fcs, nwwn); in bfa_fcs_lport_get_rport_by_nwwn()
972 bfa_fcs_lport_get_rport_by_qualifier(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_get_rport_by_qualifier() argument
978 list_for_each(qe, &port->rport_q) { in bfa_fcs_lport_get_rport_by_qualifier()
984 bfa_trc(port->fcs, pwwn); in bfa_fcs_lport_get_rport_by_qualifier()
993 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_add_rport() argument
996 list_add_tail(&rport->qe, &port->rport_q); in bfa_fcs_lport_add_rport()
997 port->num_rports++; in bfa_fcs_lport_add_rport()
1005 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_del_rport() argument
1008 WARN_ON(!bfa_q_is_on_q(&port->rport_q, rport)); in bfa_fcs_lport_del_rport()
1010 port->num_rports--; in bfa_fcs_lport_del_rport()
1012 bfa_sm_send_event(port, BFA_FCS_PORT_SM_DELRPORT); in bfa_fcs_lport_del_rport()
1020 bfa_fcs_lport_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_online() argument
1022 bfa_sm_send_event(port, BFA_FCS_PORT_SM_ONLINE); in bfa_fcs_lport_online()
1030 bfa_fcs_lport_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_offline() argument
1032 bfa_sm_send_event(port, BFA_FCS_PORT_SM_OFFLINE); in bfa_fcs_lport_offline()
1040 bfa_fcs_lport_stop(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_stop() argument
1042 bfa_sm_send_event(port, BFA_FCS_PORT_SM_STOP); in bfa_fcs_lport_stop()
1052 bfa_fcs_lport_delete(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_delete() argument
1054 bfa_sm_send_event(port, BFA_FCS_PORT_SM_DELETE); in bfa_fcs_lport_delete()
1061 bfa_fcs_lport_is_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_is_online() argument
1063 return bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online); in bfa_fcs_lport_is_online()
1114 bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_set_symname() argument
1117 strcpy(port->port_cfg.sym_name.symname, symname); in bfa_fcs_lport_set_symname()
1119 if (bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online)) in bfa_fcs_lport_set_symname()
1121 BFA_FCS_GET_NS_FROM_PORT(port), NULL); in bfa_fcs_lport_set_symname()
1130 struct bfa_fcs_lport_s *port, in bfa_fcs_lport_get_attr() argument
1133 if (bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online)) in bfa_fcs_lport_get_attr()
1134 port_attr->pid = port->pid; in bfa_fcs_lport_get_attr()
1138 port_attr->port_cfg = port->port_cfg; in bfa_fcs_lport_get_attr()
1140 if (port->fabric) { in bfa_fcs_lport_get_attr()
1141 port_attr->port_type = port->fabric->oper_type; in bfa_fcs_lport_get_attr()
1142 port_attr->loopback = bfa_sm_cmp_state(port->fabric, in bfa_fcs_lport_get_attr()
1145 bfa_sm_cmp_state(port->fabric, in bfa_fcs_lport_get_attr()
1147 port_attr->fabric_name = bfa_fcs_lport_get_fabric_name(port); in bfa_fcs_lport_get_attr()
1149 bfa_fcs_lport_get_fabric_ipaddr(port), in bfa_fcs_lport_get_attr()
1152 if (port->vport != NULL) { in bfa_fcs_lport_get_attr()
1155 port->vport->lps->lp_mac; in bfa_fcs_lport_get_attr()
1158 port->fabric->lps->lp_mac; in bfa_fcs_lport_get_attr()
1174 bfa_fcs_lport_fab_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_fab_init() argument
1176 bfa_fcs_lport_ns_init(port); in bfa_fcs_lport_fab_init()
1177 bfa_fcs_lport_scn_init(port); in bfa_fcs_lport_fab_init()
1178 bfa_fcs_lport_ms_init(port); in bfa_fcs_lport_fab_init()
1185 bfa_fcs_lport_fab_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_fab_online() argument
1187 bfa_fcs_lport_ns_online(port); in bfa_fcs_lport_fab_online()
1188 bfa_fcs_lport_fab_scn_online(port); in bfa_fcs_lport_fab_online()
1195 bfa_fcs_lport_fab_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_fab_offline() argument
1197 bfa_fcs_lport_ns_offline(port); in bfa_fcs_lport_fab_offline()
1198 bfa_fcs_lport_scn_offline(port); in bfa_fcs_lport_fab_offline()
1199 bfa_fcs_lport_ms_offline(port); in bfa_fcs_lport_fab_offline()
1210 bfa_fcs_lport_n2n_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_n2n_init() argument
1218 bfa_fcs_lport_n2n_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_n2n_online() argument
1220 struct bfa_fcs_lport_n2n_s *n2n_port = &port->port_topo.pn2n; in bfa_fcs_lport_n2n_online()
1221 struct bfa_lport_cfg_s *pcfg = &port->port_cfg; in bfa_fcs_lport_n2n_online()
1224 bfa_trc(port->fcs, pcfg->pwwn); in bfa_fcs_lport_n2n_online()
1237 port->pid = N2N_LOCAL_PID; in bfa_fcs_lport_n2n_online()
1238 bfa_lps_set_n2n_pid(port->fabric->lps, N2N_LOCAL_PID); in bfa_fcs_lport_n2n_online()
1242 rport = bfa_fcs_lport_get_rport_by_pwwn(port, in bfa_fcs_lport_n2n_online()
1245 bfa_trc(port->fcs, rport->pid); in bfa_fcs_lport_n2n_online()
1246 bfa_trc(port->fcs, rport->pwwn); in bfa_fcs_lport_n2n_online()
1256 if (port->num_rports > 0) { in bfa_fcs_lport_n2n_online()
1257 rport = bfa_fcs_lport_get_rport_by_pid(port, 0); in bfa_fcs_lport_n2n_online()
1260 bfa_trc(port->fcs, rport->pwwn); in bfa_fcs_lport_n2n_online()
1264 bfa_fcs_rport_create(port, N2N_REMOTE_PID); in bfa_fcs_lport_n2n_online()
1272 bfa_fcs_lport_n2n_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_n2n_offline() argument
1274 struct bfa_fcs_lport_n2n_s *n2n_port = &port->port_topo.pn2n; in bfa_fcs_lport_n2n_offline()
1276 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_n2n_offline()
1277 port->pid = 0; in bfa_fcs_lport_n2n_offline()
1283 bfa_fcport_get_loop_attr(struct bfa_fcs_lport_s *port) in bfa_fcport_get_loop_attr() argument
1287 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(port->fcs->bfa); in bfa_fcport_get_loop_attr()
1289 port->port_topo.ploop.alpabm_valid = fcport->alpabm_valid; in bfa_fcport_get_loop_attr()
1290 port->pid = fcport->myalpa; in bfa_fcport_get_loop_attr()
1291 port->pid = bfa_hton3b(port->pid); in bfa_fcport_get_loop_attr()
1295 bfa_trc(port->fcs->bfa, fcport->alpabm.alpa_bm[i]); in bfa_fcport_get_loop_attr()
1298 port->port_topo.ploop.alpa_pos_map[k] = in bfa_fcport_get_loop_attr()
1301 bfa_trc(port->fcs->bfa, k); in bfa_fcport_get_loop_attr()
1302 bfa_trc(port->fcs->bfa, in bfa_fcport_get_loop_attr()
1303 port->port_topo.ploop.alpa_pos_map[k]); in bfa_fcport_get_loop_attr()
1307 port->port_topo.ploop.num_alpa = k; in bfa_fcport_get_loop_attr()
1314 bfa_fcs_lport_loop_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_loop_init() argument
1322 bfa_fcs_lport_loop_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_loop_online() argument
1330 bfa_fcport_get_loop_attr(port); in bfa_fcs_lport_loop_online()
1332 num_alpa = port->port_topo.ploop.num_alpa; in bfa_fcs_lport_loop_online()
1333 alpabm_valid = port->port_topo.ploop.alpabm_valid; in bfa_fcs_lport_loop_online()
1334 alpa_map = port->port_topo.ploop.alpa_pos_map; in bfa_fcs_lport_loop_online()
1336 bfa_trc(port->fcs->bfa, port->pid); in bfa_fcs_lport_loop_online()
1337 bfa_trc(port->fcs->bfa, num_alpa); in bfa_fcs_lport_loop_online()
1340 bfa_trc(port->fcs->bfa, alpa_map[i]); in bfa_fcs_lport_loop_online()
1341 if (alpa_map[i] != bfa_hton3b(port->pid)) { in bfa_fcs_lport_loop_online()
1343 bfa_trc(port->fcs->bfa, pid); in bfa_fcs_lport_loop_online()
1344 rport = bfa_fcs_lport_get_rport_by_pid(port, in bfa_fcs_lport_loop_online()
1347 rport = bfa_fcs_rport_create(port, in bfa_fcs_lport_loop_online()
1353 if (alpa_map[i] != port->pid) { in bfa_fcs_lport_loop_online()
1355 bfa_trc(port->fcs->bfa, pid); in bfa_fcs_lport_loop_online()
1356 rport = bfa_fcs_lport_get_rport_by_pid(port, in bfa_fcs_lport_loop_online()
1359 rport = bfa_fcs_rport_create(port, in bfa_fcs_lport_loop_online()
1370 bfa_fcs_lport_loop_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_loop_offline() argument
1477 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_offline() local
1479 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_offline()
1480 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_offline()
1486 if (port->vport) { in bfa_fcs_lport_fdmi_sm_offline()
1509 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_offline()
1517 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_sending_rhba() local
1519 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_sending_rhba()
1520 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_sending_rhba()
1529 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(port), in bfa_fcs_lport_fdmi_sm_sending_rhba()
1534 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_sending_rhba()
1542 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rhba() local
1544 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_rhba()
1545 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rhba()
1556 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(port), in bfa_fcs_lport_fdmi_sm_rhba()
1583 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rhba()
1591 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rhba_retry() local
1593 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1594 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1611 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rhba_retry()
1622 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_sending_rprt() local
1624 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_sending_rprt()
1625 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_sending_rprt()
1634 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(port), in bfa_fcs_lport_fdmi_sm_sending_rprt()
1639 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_sending_rprt()
1647 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rprt() local
1649 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_rprt()
1650 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rprt()
1661 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(port), in bfa_fcs_lport_fdmi_sm_rprt()
1686 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rprt()
1694 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rprt_retry() local
1696 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1697 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1714 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rprt_retry()
1725 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_sending_rpa() local
1727 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_sending_rpa()
1728 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_sending_rpa()
1737 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(port), in bfa_fcs_lport_fdmi_sm_sending_rpa()
1742 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_sending_rpa()
1750 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rpa() local
1752 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_rpa()
1753 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rpa()
1763 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(port), in bfa_fcs_lport_fdmi_sm_rpa()
1787 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rpa()
1795 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_rpa_retry() local
1797 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1798 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1815 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_rpa_retry()
1823 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_online() local
1825 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_online()
1826 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_online()
1834 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_fdmi_sm_online()
1844 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_sm_disabled() local
1846 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_sm_disabled()
1847 bfa_trc(port->fcs, event); in bfa_fcs_lport_fdmi_sm_disabled()
1859 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_send_rhba() local
1865 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_send_rhba()
1868 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_fdmi_send_rhba()
1870 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &fdmi->fcxp_wqe, in bfa_fcs_lport_fdmi_send_rhba()
1879 len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_fdmi_send_rhba()
1887 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_fdmi_send_rhba()
1898 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_build_rhba_pyld() local
1912 rhba->hba_id = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_fdmi_build_rhba_pyld()
1914 rhba->port_list.port_entry = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_fdmi_build_rhba_pyld()
1932 memcpy(attr->value, &bfa_fcs_lport_get_nwwn(port), templen); in bfa_fcs_lport_fdmi_build_rhba_pyld()
2158 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_rhba_response() local
2161 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_rhba_response()
2167 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_fdmi_rhba_response()
2180 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_fdmi_rhba_response()
2181 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_fdmi_rhba_response()
2192 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_send_rprt() local
2198 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_send_rprt()
2201 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_fdmi_send_rprt()
2203 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &fdmi->fcxp_wqe, in bfa_fcs_lport_fdmi_send_rprt()
2212 len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_fdmi_send_rprt()
2220 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_fdmi_send_rprt()
2458 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_build_rprt_pyld() local
2462 rprt->hba_id = bfa_fcs_lport_get_pwwn(bfa_fcs_get_base_port(port->fcs)); in bfa_fcs_lport_fdmi_build_rprt_pyld()
2463 rprt->port_name = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_fdmi_build_rprt_pyld()
2481 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_rprt_response() local
2484 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_rprt_response()
2490 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_fdmi_rprt_response()
2503 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_fdmi_rprt_response()
2504 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_fdmi_rprt_response()
2515 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_send_rpa() local
2521 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_send_rpa()
2524 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_fdmi_send_rpa()
2526 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &fdmi->fcxp_wqe, in bfa_fcs_lport_fdmi_send_rpa()
2535 len = fc_fdmi_reqhdr_build(&fchs, pyld, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_fdmi_send_rpa()
2541 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_fdmi_send_rpa()
2552 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_build_rpa_pyld() local
2556 rpa->port_name = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_fdmi_build_rpa_pyld()
2573 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_lport_fdmi_rpa_response() local
2576 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_fdmi_rpa_response()
2582 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_fdmi_rpa_response()
2595 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_fdmi_rpa_response()
2596 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_fdmi_rpa_response()
2612 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_fdmi_get_hbaattr() local
2613 struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info; in bfa_fcs_fdmi_get_hbaattr()
2618 bfa_ioc_get_adapter_manufacturer(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2620 bfa_ioc_get_adapter_serial_num(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2622 bfa_ioc_get_adapter_model(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2624 bfa_ioc_get_adapter_model(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2626 bfa_ioc_get_pci_chip_rev(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2628 bfa_ioc_get_adapter_optrom_ver(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2630 bfa_ioc_get_adapter_fw_ver(&port->fcs->bfa->ioc, in bfa_fcs_fdmi_get_hbaattr()
2655 port->port_cfg.node_sym_name.symname, BFA_SYMNAME_MAXLEN); in bfa_fcs_fdmi_get_hbaattr()
2658 cpu_to_be32(bfa_ioc_get_nports(&port->fcs->bfa->ioc)); in bfa_fcs_fdmi_get_hbaattr()
2659 hba_attr->fabric_name = port->fabric->lps->pr_nwwn; in bfa_fcs_fdmi_get_hbaattr()
2668 struct bfa_fcs_lport_s *port = fdmi->ms->port; in bfa_fcs_fdmi_get_portattr() local
2669 struct bfa_fcs_driver_info_s *driver_info = &port->fcs->driver_info; in bfa_fcs_fdmi_get_portattr()
2678 bfa_fcport_get_attr(port->fcs->bfa, &pport_attr); in bfa_fcs_fdmi_get_portattr()
2710 bfa_sm_fault(port->fcs, pport_attr.speed_supported); in bfa_fcs_fdmi_get_portattr()
2736 port_attr->node_name = bfa_fcs_lport_get_nwwn(port); in bfa_fcs_fdmi_get_portattr()
2737 port_attr->port_name = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_fdmi_get_portattr()
2740 (char *)&bfa_fcs_lport_get_psym_name(port), BFA_SYMNAME_MAXLEN); in bfa_fcs_fdmi_get_portattr()
2741 bfa_fcs_lport_get_attr(port, &lport_attr); in bfa_fcs_fdmi_get_portattr()
2744 port_attr->port_fabric_name = port->fabric->lps->pr_nwwn; in bfa_fcs_fdmi_get_portattr()
2747 port_attr->num_ports = cpu_to_be32(port->num_rports); in bfa_fcs_fdmi_get_portattr()
2792 if (ms->port->fcs->fdmi_enabled) in bfa_fcs_lport_fdmi_init()
2896 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_offline()
2897 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_offline()
2909 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_offline()
2917 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_plogi_sending()
2918 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_plogi_sending()
2927 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ms->port), in bfa_fcs_lport_ms_sm_plogi_sending()
2932 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_plogi_sending()
2940 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_plogi()
2941 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_plogi()
2949 ms->port->stats.ms_retries++; in bfa_fcs_lport_ms_sm_plogi()
2950 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port), in bfa_fcs_lport_ms_sm_plogi()
2964 if (ms->port->vport) { in bfa_fcs_lport_ms_sm_plogi()
2983 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_plogi()
2991 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_plogi_retry()
2992 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_plogi_retry()
3009 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_plogi_retry()
3017 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_online()
3018 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_online()
3032 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_online()
3040 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_gmal_sending()
3041 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gmal_sending()
3050 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ms->port), in bfa_fcs_lport_ms_sm_gmal_sending()
3055 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gmal_sending()
3063 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_gmal()
3064 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gmal()
3073 ms->port->stats.ms_retries++; in bfa_fcs_lport_ms_sm_gmal()
3074 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port), in bfa_fcs_lport_ms_sm_gmal()
3095 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gmal()
3103 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_gmal_retry()
3104 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gmal_retry()
3121 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gmal_retry()
3132 bfa_fcs_lport_t *port = ms->port; in bfa_fcs_lport_ms_send_gmal() local
3137 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_ms_send_gmal()
3140 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ms_send_gmal()
3142 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ms->fcxp_wqe, in bfa_fcs_lport_ms_send_gmal()
3149 bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_ms_send_gmal()
3150 port->fabric->lps->pr_nwwn); in bfa_fcs_lport_ms_send_gmal()
3152 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ms_send_gmal()
3167 bfa_fcs_lport_t *port = ms->port; in bfa_fcs_lport_ms_gmal_response() local
3174 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ms_gmal_response()
3175 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ms_gmal_response()
3181 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ms_gmal_response()
3220 strncpy(bfa_fcs_lport_get_fabric_ipaddr(port), in bfa_fcs_lport_ms_gmal_response()
3234 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ms_gmal_response()
3235 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ms_gmal_response()
3243 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_gfn_sending()
3244 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gfn_sending()
3253 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ms->port), in bfa_fcs_lport_ms_sm_gfn_sending()
3258 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gfn_sending()
3266 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_gfn()
3267 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gfn()
3276 ms->port->stats.ms_retries++; in bfa_fcs_lport_ms_sm_gfn()
3277 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port), in bfa_fcs_lport_ms_sm_gfn()
3296 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gfn()
3304 bfa_trc(ms->port->fcs, ms->port->port_cfg.pwwn); in bfa_fcs_lport_ms_sm_gfn_retry()
3305 bfa_trc(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gfn_retry()
3322 bfa_sm_fault(ms->port->fcs, event); in bfa_fcs_lport_ms_sm_gfn_retry()
3333 bfa_fcs_lport_t *port = ms->port; in bfa_fcs_lport_ms_send_gfn() local
3338 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_ms_send_gfn()
3341 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ms_send_gfn()
3343 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ms->fcxp_wqe, in bfa_fcs_lport_ms_send_gfn()
3350 bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_ms_send_gfn()
3351 port->fabric->lps->pr_nwwn); in bfa_fcs_lport_ms_send_gfn()
3353 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ms_send_gfn()
3367 bfa_fcs_lport_t *port = ms->port; in bfa_fcs_lport_ms_gfn_response() local
3371 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ms_gfn_response()
3372 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ms_gfn_response()
3378 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ms_gfn_response()
3389 if ((memcmp((void *)&bfa_fcs_lport_get_fabric_name(port), in bfa_fcs_lport_ms_gfn_response()
3391 bfa_fcs_fabric_set_fabric_name(port->fabric, *gfn_resp); in bfa_fcs_lport_ms_gfn_response()
3397 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ms_gfn_response()
3398 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ms_gfn_response()
3410 struct bfa_fcs_lport_s *port = ms->port; in bfa_fcs_lport_ms_send_plogi() local
3415 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_ms_send_plogi()
3418 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ms_send_plogi()
3420 port->stats.ms_plogi_alloc_wait++; in bfa_fcs_lport_ms_send_plogi()
3421 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ms->fcxp_wqe, in bfa_fcs_lport_ms_send_plogi()
3429 bfa_fcs_lport_get_fcid(port), 0, in bfa_fcs_lport_ms_send_plogi()
3430 port->port_cfg.pwwn, port->port_cfg.nwwn, in bfa_fcs_lport_ms_send_plogi()
3431 bfa_fcport_get_maxfrsize(port->fcs->bfa), in bfa_fcs_lport_ms_send_plogi()
3432 bfa_fcport_get_rx_bbcredit(port->fcs->bfa)); in bfa_fcs_lport_ms_send_plogi()
3434 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ms_send_plogi()
3439 port->stats.ms_plogi_sent++; in bfa_fcs_lport_ms_send_plogi()
3449 struct bfa_fcs_lport_s *port = ms->port; in bfa_fcs_lport_ms_plogi_response() local
3453 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ms_plogi_response()
3454 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ms_plogi_response()
3460 port->stats.ms_plogi_rsp_err++; in bfa_fcs_lport_ms_plogi_response()
3461 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ms_plogi_response()
3472 bfa_trc(port->fcs, rsp_len); in bfa_fcs_lport_ms_plogi_response()
3473 port->stats.ms_plogi_acc_err++; in bfa_fcs_lport_ms_plogi_response()
3477 port->stats.ms_plogi_accepts++; in bfa_fcs_lport_ms_plogi_response()
3484 bfa_trc(port->fcs, ls_rjt->reason_code); in bfa_fcs_lport_ms_plogi_response()
3485 bfa_trc(port->fcs, ls_rjt->reason_code_expl); in bfa_fcs_lport_ms_plogi_response()
3487 port->stats.ms_rejects++; in bfa_fcs_lport_ms_plogi_response()
3492 port->stats.ms_plogi_unknown_rsp++; in bfa_fcs_lport_ms_plogi_response()
3493 bfa_trc(port->fcs, els_cmd->els_code); in bfa_fcs_lport_ms_plogi_response()
3503 ms->port->stats.ms_timeouts++; in bfa_fcs_lport_ms_timeout()
3509 bfa_fcs_lport_ms_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ms_init() argument
3511 struct bfa_fcs_lport_ms_s *ms = BFA_FCS_GET_MS_FROM_PORT(port); in bfa_fcs_lport_ms_init()
3513 ms->port = port; in bfa_fcs_lport_ms_init()
3523 bfa_fcs_lport_ms_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ms_offline() argument
3525 struct bfa_fcs_lport_ms_s *ms = BFA_FCS_GET_MS_FROM_PORT(port); in bfa_fcs_lport_ms_offline()
3527 ms->port = port; in bfa_fcs_lport_ms_offline()
3533 bfa_fcs_lport_ms_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ms_online() argument
3535 struct bfa_fcs_lport_ms_s *ms = BFA_FCS_GET_MS_FROM_PORT(port); in bfa_fcs_lport_ms_online()
3537 ms->port = port; in bfa_fcs_lport_ms_online()
3541 bfa_fcs_lport_ms_fabric_rscn(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ms_fabric_rscn() argument
3543 struct bfa_fcs_lport_ms_s *ms = BFA_FCS_GET_MS_FROM_PORT(port); in bfa_fcs_lport_ms_fabric_rscn()
3627 struct bfa_fcs_lport_s *port,
3630 static void bfa_fcs_lport_ns_boot_target_disc(bfa_fcs_lport_t *port);
3714 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_offline()
3715 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_offline()
3727 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_offline()
3735 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_plogi_sending()
3736 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_plogi_sending()
3745 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_plogi_sending()
3750 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_plogi_sending()
3758 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_plogi()
3759 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_plogi()
3767 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_plogi()
3768 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_plogi()
3785 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_plogi()
3793 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_plogi_retry()
3794 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_plogi_retry()
3811 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_plogi_retry()
3819 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_sending_rnn_id()
3820 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rnn_id()
3829 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_sending_rnn_id()
3833 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rnn_id()
3841 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rnn_id()
3842 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rnn_id()
3855 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_rnn_id()
3857 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_rnn_id()
3873 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rnn_id()
3881 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rnn_id_retry()
3882 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rnn_id_retry()
3896 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rnn_id_retry()
3904 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_sending_rsnn_nn()
3905 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rsnn_nn()
3914 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_sending_rsnn_nn()
3919 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rsnn_nn()
3927 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rsnn_nn()
3928 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rsnn_nn()
3940 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_rsnn_nn()
3942 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_rsnn_nn()
3958 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rsnn_nn()
3966 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rsnn_nn_retry()
3967 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rsnn_nn_retry()
3981 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rsnn_nn_retry()
3989 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_sending_rspn_id()
3990 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rspn_id()
3999 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_sending_rspn_id()
4004 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rspn_id()
4012 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rspn_id()
4013 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rspn_id()
4021 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_rspn_id()
4022 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_rspn_id()
4038 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rspn_id()
4046 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rspn_id_retry()
4047 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rspn_id_retry()
4064 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rspn_id_retry()
4072 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_sending_rft_id()
4073 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rft_id()
4082 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_sending_rft_id()
4087 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rft_id()
4095 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rft_id()
4096 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rft_id()
4110 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_rft_id()
4111 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_rft_id()
4122 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rft_id()
4130 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rft_id_retry()
4131 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rft_id_retry()
4145 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rft_id_retry()
4153 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_sending_rff_id()
4154 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rff_id()
4163 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_sending_rff_id()
4168 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_rff_id()
4176 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rff_id()
4177 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rff_id()
4187 if (__fcs_min_cfg(ns->port->fcs)) { in bfa_fcs_lport_ns_sm_rff_id()
4188 bfa_fcs_lport_ns_boot_target_disc(ns->port); in bfa_fcs_lport_ns_sm_rff_id()
4197 if (BFA_FCS_VPORT_IS_INITIATOR_MODE(ns->port)) { in bfa_fcs_lport_ns_sm_rff_id()
4205 bfa_fcs_lport_ms_online(ns->port); in bfa_fcs_lport_ns_sm_rff_id()
4213 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_rff_id()
4214 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_rff_id()
4225 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rff_id()
4233 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_rff_id_retry()
4234 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rff_id_retry()
4248 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_rff_id_retry()
4255 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_sending_gid_ft()
4256 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_gid_ft()
4265 bfa_fcxp_walloc_cancel(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_sending_gid_ft()
4270 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_sending_gid_ft()
4278 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_gid_ft()
4279 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_gid_ft()
4294 ns->port->stats.ns_retries++; in bfa_fcs_lport_ns_sm_gid_ft()
4295 bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ns->port), in bfa_fcs_lport_ns_sm_gid_ft()
4309 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_gid_ft()
4317 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_gid_ft_retry()
4318 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_gid_ft_retry()
4332 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_gid_ft_retry()
4340 bfa_trc(ns->port->fcs, ns->port->port_cfg.pwwn); in bfa_fcs_lport_ns_sm_online()
4341 bfa_trc(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_online()
4353 if (BFA_FCS_VPORT_IS_INITIATOR_MODE(ns->port)) { in bfa_fcs_lport_ns_sm_online()
4361 bfa_sm_fault(ns->port->fcs, event); in bfa_fcs_lport_ns_sm_online()
4375 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_plogi() local
4380 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_ns_send_plogi()
4383 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_plogi()
4385 port->stats.ns_plogi_alloc_wait++; in bfa_fcs_lport_ns_send_plogi()
4386 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_plogi()
4394 bfa_fcs_lport_get_fcid(port), 0, in bfa_fcs_lport_ns_send_plogi()
4395 port->port_cfg.pwwn, port->port_cfg.nwwn, in bfa_fcs_lport_ns_send_plogi()
4396 bfa_fcport_get_maxfrsize(port->fcs->bfa), in bfa_fcs_lport_ns_send_plogi()
4397 bfa_fcport_get_rx_bbcredit(port->fcs->bfa)); in bfa_fcs_lport_ns_send_plogi()
4399 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_plogi()
4403 port->stats.ns_plogi_sent++; in bfa_fcs_lport_ns_send_plogi()
4414 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_plogi_response() local
4419 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_plogi_response()
4420 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_plogi_response()
4426 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_plogi_response()
4427 port->stats.ns_plogi_rsp_err++; in bfa_fcs_lport_ns_plogi_response()
4438 bfa_trc(port->fcs, rsp_len); in bfa_fcs_lport_ns_plogi_response()
4439 port->stats.ns_plogi_acc_err++; in bfa_fcs_lport_ns_plogi_response()
4443 port->stats.ns_plogi_accepts++; in bfa_fcs_lport_ns_plogi_response()
4450 bfa_trc(port->fcs, ls_rjt->reason_code); in bfa_fcs_lport_ns_plogi_response()
4451 bfa_trc(port->fcs, ls_rjt->reason_code_expl); in bfa_fcs_lport_ns_plogi_response()
4453 port->stats.ns_rejects++; in bfa_fcs_lport_ns_plogi_response()
4459 port->stats.ns_plogi_unknown_rsp++; in bfa_fcs_lport_ns_plogi_response()
4460 bfa_trc(port->fcs, els_cmd->els_code); in bfa_fcs_lport_ns_plogi_response()
4472 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_rnn_id() local
4477 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_send_rnn_id()
4480 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_rnn_id()
4482 port->stats.ns_rnnid_alloc_wait++; in bfa_fcs_lport_ns_send_rnn_id()
4483 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_rnn_id()
4491 bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_ns_send_rnn_id()
4492 bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_ns_send_rnn_id()
4493 bfa_fcs_lport_get_nwwn(port)); in bfa_fcs_lport_ns_send_rnn_id()
4495 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_rnn_id()
4500 port->stats.ns_rnnid_sent++; in bfa_fcs_lport_ns_send_rnn_id()
4512 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_rnn_id_response() local
4515 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_rnn_id_response()
4521 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_rnn_id_response()
4522 port->stats.ns_rnnid_rsp_err++; in bfa_fcs_lport_ns_rnn_id_response()
4531 port->stats.ns_rnnid_accepts++; in bfa_fcs_lport_ns_rnn_id_response()
4536 port->stats.ns_rnnid_rejects++; in bfa_fcs_lport_ns_rnn_id_response()
4537 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ns_rnn_id_response()
4538 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ns_rnn_id_response()
4549 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_rsnn_nn() local
4555 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_send_rsnn_nn()
4558 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_rsnn_nn()
4560 port->stats.ns_rsnn_nn_alloc_wait++; in bfa_fcs_lport_ns_send_rsnn_nn()
4561 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_rsnn_nn()
4568 bfa_fcs_get_base_port(port->fcs))); in bfa_fcs_lport_ns_send_rsnn_nn()
4571 bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_ns_send_rsnn_nn()
4572 bfa_fcs_lport_get_nwwn(port), nsymbl); in bfa_fcs_lport_ns_send_rsnn_nn()
4574 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_rsnn_nn()
4579 port->stats.ns_rsnn_nn_sent++; in bfa_fcs_lport_ns_send_rsnn_nn()
4591 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_rsnn_nn_response() local
4594 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_rsnn_nn_response()
4600 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_rsnn_nn_response()
4601 port->stats.ns_rsnn_nn_rsp_err++; in bfa_fcs_lport_ns_rsnn_nn_response()
4610 port->stats.ns_rsnn_nn_accepts++; in bfa_fcs_lport_ns_rsnn_nn_response()
4615 port->stats.ns_rsnn_nn_rejects++; in bfa_fcs_lport_ns_rsnn_nn_response()
4616 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ns_rsnn_nn_response()
4617 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ns_rsnn_nn_response()
4628 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_rspn_id() local
4637 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_send_rspn_id()
4640 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_rspn_id()
4642 port->stats.ns_rspnid_alloc_wait++; in bfa_fcs_lport_ns_send_rspn_id()
4643 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_rspn_id()
4652 if (port->vport) { in bfa_fcs_lport_ns_send_rspn_id()
4661 (bfa_fcs_get_base_port(port->fcs))), in bfa_fcs_lport_ns_send_rspn_id()
4664 (port->fcs)))); in bfa_fcs_lport_ns_send_rspn_id()
4669 (port->fcs)))] = 0; in bfa_fcs_lport_ns_send_rspn_id()
4671 (char *) &(bfa_fcs_lport_get_psym_name(port)), in bfa_fcs_lport_ns_send_rspn_id()
4672 strlen((char *) &bfa_fcs_lport_get_psym_name(port))); in bfa_fcs_lport_ns_send_rspn_id()
4674 psymbl = (u8 *) &(bfa_fcs_lport_get_psym_name(port)); in bfa_fcs_lport_ns_send_rspn_id()
4678 bfa_fcs_lport_get_fcid(port), 0, psymbl); in bfa_fcs_lport_ns_send_rspn_id()
4680 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_rspn_id()
4685 port->stats.ns_rspnid_sent++; in bfa_fcs_lport_ns_send_rspn_id()
4697 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_rspn_id_response() local
4700 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_rspn_id_response()
4706 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_rspn_id_response()
4707 port->stats.ns_rspnid_rsp_err++; in bfa_fcs_lport_ns_rspn_id_response()
4716 port->stats.ns_rspnid_accepts++; in bfa_fcs_lport_ns_rspn_id_response()
4721 port->stats.ns_rspnid_rejects++; in bfa_fcs_lport_ns_rspn_id_response()
4722 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ns_rspn_id_response()
4723 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ns_rspn_id_response()
4734 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_rft_id() local
4739 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_send_rft_id()
4742 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_rft_id()
4744 port->stats.ns_rftid_alloc_wait++; in bfa_fcs_lport_ns_send_rft_id()
4745 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_rft_id()
4752 bfa_fcs_lport_get_fcid(port), 0, port->port_cfg.roles); in bfa_fcs_lport_ns_send_rft_id()
4754 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_rft_id()
4759 port->stats.ns_rftid_sent++; in bfa_fcs_lport_ns_send_rft_id()
4770 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_rft_id_response() local
4773 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_rft_id_response()
4779 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_rft_id_response()
4780 port->stats.ns_rftid_rsp_err++; in bfa_fcs_lport_ns_rft_id_response()
4789 port->stats.ns_rftid_accepts++; in bfa_fcs_lport_ns_rft_id_response()
4794 port->stats.ns_rftid_rejects++; in bfa_fcs_lport_ns_rft_id_response()
4795 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ns_rft_id_response()
4796 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ns_rft_id_response()
4807 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_rff_id() local
4813 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_send_rff_id()
4816 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_rff_id()
4818 port->stats.ns_rffid_alloc_wait++; in bfa_fcs_lport_ns_send_rff_id()
4819 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_rff_id()
4825 if (BFA_FCS_VPORT_IS_INITIATOR_MODE(ns->port)) in bfa_fcs_lport_ns_send_rff_id()
4829 bfa_fcs_lport_get_fcid(port), 0, in bfa_fcs_lport_ns_send_rff_id()
4832 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_rff_id()
4837 port->stats.ns_rffid_sent++; in bfa_fcs_lport_ns_send_rff_id()
4848 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_rff_id_response() local
4851 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_rff_id_response()
4857 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_rff_id_response()
4858 port->stats.ns_rffid_rsp_err++; in bfa_fcs_lport_ns_rff_id_response()
4867 port->stats.ns_rffid_accepts++; in bfa_fcs_lport_ns_rff_id_response()
4872 port->stats.ns_rffid_rejects++; in bfa_fcs_lport_ns_rff_id_response()
4873 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ns_rff_id_response()
4874 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ns_rff_id_response()
4892 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_send_gid_ft() local
4897 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_ns_send_gid_ft()
4900 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_ns_send_gid_ft()
4902 port->stats.ns_gidft_alloc_wait++; in bfa_fcs_lport_ns_send_gid_ft()
4903 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_send_gid_ft()
4913 ns->port->pid, FC_TYPE_FCP); in bfa_fcs_lport_ns_send_gid_ft()
4915 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_send_gid_ft()
4918 bfa_fcxp_get_maxrsp(port->fcs->bfa), FC_FCCT_TOV); in bfa_fcs_lport_ns_send_gid_ft()
4920 port->stats.ns_gidft_sent++; in bfa_fcs_lport_ns_send_gid_ft()
4932 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_gid_ft_response() local
4936 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_gid_ft_response()
4942 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_ns_gid_ft_response()
4943 port->stats.ns_gidft_rsp_err++; in bfa_fcs_lport_ns_gid_ft_response()
4953 bfa_trc(port->fcs, rsp_len); in bfa_fcs_lport_ns_gid_ft_response()
4954 bfa_trc(port->fcs, resid_len); in bfa_fcs_lport_ns_gid_ft_response()
4965 port->stats.ns_gidft_accepts++; in bfa_fcs_lport_ns_gid_ft_response()
4967 bfa_trc(port->fcs, n_pids); in bfa_fcs_lport_ns_gid_ft_response()
4968 bfa_fcs_lport_ns_process_gidft_pids(port, in bfa_fcs_lport_ns_gid_ft_response()
4980 port->stats.ns_gidft_rejects++; in bfa_fcs_lport_ns_gid_ft_response()
4981 bfa_trc(port->fcs, cthdr->reason_code); in bfa_fcs_lport_ns_gid_ft_response()
4982 bfa_trc(port->fcs, cthdr->exp_code); in bfa_fcs_lport_ns_gid_ft_response()
4997 port->stats.ns_gidft_unknown_rsp++; in bfa_fcs_lport_ns_gid_ft_response()
4998 bfa_trc(port->fcs, cthdr->cmd_rsp_code); in bfa_fcs_lport_ns_gid_ft_response()
5020 ns->port->stats.ns_timeouts++; in bfa_fcs_lport_ns_timeout()
5028 bfa_fcs_lport_ns_process_gidft_pids(struct bfa_fcs_lport_s *port, u32 *pid_buf, in bfa_fcs_lport_ns_process_gidft_pids() argument
5034 struct bfa_fcs_fabric_s *fabric = port->fabric; in bfa_fcs_lport_ns_process_gidft_pids()
5042 if (gidft_entry->pid == port->pid) in bfa_fcs_lport_ns_process_gidft_pids()
5071 rport = bfa_fcs_lport_get_rport_by_pid(port, gidft_entry->pid); in bfa_fcs_lport_ns_process_gidft_pids()
5076 rport = bfa_fcs_rport_create(port, gidft_entry->pid); in bfa_fcs_lport_ns_process_gidft_pids()
5084 bfa_trc(port->fcs, gidft_entry->pid); in bfa_fcs_lport_ns_process_gidft_pids()
5103 bfa_fcs_lport_ns_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ns_init() argument
5105 struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port); in bfa_fcs_lport_ns_init()
5107 ns->port = port; in bfa_fcs_lport_ns_init()
5112 bfa_fcs_lport_ns_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ns_offline() argument
5114 struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port); in bfa_fcs_lport_ns_offline()
5116 ns->port = port; in bfa_fcs_lport_ns_offline()
5121 bfa_fcs_lport_ns_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ns_online() argument
5123 struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port); in bfa_fcs_lport_ns_online()
5125 ns->port = port; in bfa_fcs_lport_ns_online()
5130 bfa_fcs_lport_ns_query(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_ns_query() argument
5132 struct bfa_fcs_lport_ns_s *ns = BFA_FCS_GET_NS_FROM_PORT(port); in bfa_fcs_lport_ns_query()
5134 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_ns_query()
5140 bfa_fcs_lport_ns_boot_target_disc(bfa_fcs_lport_t *port) in bfa_fcs_lport_ns_boot_target_disc() argument
5148 bfa_iocfc_get_bootwwns(port->fcs->bfa, &nwwns, wwns); in bfa_fcs_lport_ns_boot_target_disc()
5151 rport = bfa_fcs_rport_create_by_wwn(port, wwns[ii]); in bfa_fcs_lport_ns_boot_target_disc()
5160 struct bfa_fcs_lport_s *port = ns->port; in bfa_fcs_lport_ns_util_send_rspn_id() local
5176 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_ns_util_send_rspn_id()
5179 bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_ns_util_send_rspn_id()
5181 port->stats.ns_rspnid_alloc_wait++; in bfa_fcs_lport_ns_util_send_rspn_id()
5182 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &ns->fcxp_wqe, in bfa_fcs_lport_ns_util_send_rspn_id()
5189 if (port->vport) { in bfa_fcs_lport_ns_util_send_rspn_id()
5195 (bfa_fcs_get_base_port(port->fcs))), in bfa_fcs_lport_ns_util_send_rspn_id()
5197 bfa_fcs_get_base_port(port->fcs)))); in bfa_fcs_lport_ns_util_send_rspn_id()
5201 bfa_fcs_get_base_port(port->fcs)))] = 0; in bfa_fcs_lport_ns_util_send_rspn_id()
5204 (char *)&(bfa_fcs_lport_get_psym_name(port)), in bfa_fcs_lport_ns_util_send_rspn_id()
5205 strlen((char *)&bfa_fcs_lport_get_psym_name(port))); in bfa_fcs_lport_ns_util_send_rspn_id()
5209 bfa_fcs_lport_get_fcid(port), 0, psymbl); in bfa_fcs_lport_ns_util_send_rspn_id()
5211 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_ns_util_send_rspn_id()
5214 port->stats.ns_rspnid_sent++; in bfa_fcs_lport_ns_util_send_rspn_id()
5236 static void bfa_fcs_lport_scn_send_ls_acc(struct bfa_fcs_lport_s *port,
5285 bfa_sm_fault(scn->port->fcs, event); in bfa_fcs_lport_scn_sm_offline()
5300 bfa_fcxp_walloc_cancel(scn->port->fcs->bfa, &scn->fcxp_wqe); in bfa_fcs_lport_scn_sm_sending_scr()
5304 bfa_sm_fault(scn->port->fcs, event); in bfa_fcs_lport_scn_sm_sending_scr()
5312 struct bfa_fcs_lport_s *port = scn->port; in bfa_fcs_lport_scn_sm_scr() local
5321 bfa_timer_start(port->fcs->bfa, &scn->timer, in bfa_fcs_lport_scn_sm_scr()
5332 bfa_sm_fault(port->fcs, event); in bfa_fcs_lport_scn_sm_scr()
5352 bfa_sm_fault(scn->port->fcs, event); in bfa_fcs_lport_scn_sm_scr_retry()
5366 bfa_sm_fault(scn->port->fcs, event); in bfa_fcs_lport_scn_sm_online()
5383 struct bfa_fcs_lport_s *port = scn->port; in bfa_fcs_lport_scn_send_scr() local
5388 bfa_trc(port->fcs, port->pid); in bfa_fcs_lport_scn_send_scr()
5389 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_scn_send_scr()
5392 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE); in bfa_fcs_lport_scn_send_scr()
5394 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &scn->fcxp_wqe, in bfa_fcs_lport_scn_send_scr()
5401 if ((!port->vport) && bfa_ioc_get_fcmode(&port->fcs->bfa->ioc)) { in bfa_fcs_lport_scn_send_scr()
5403 port->fabric->lps->brcd_switch, in bfa_fcs_lport_scn_send_scr()
5404 port->pid, 0); in bfa_fcs_lport_scn_send_scr()
5408 port->pid, 0); in bfa_fcs_lport_scn_send_scr()
5411 bfa_fcxp_send(fcxp, NULL, port->fabric->vf_id, port->lp_tag, BFA_FALSE, in bfa_fcs_lport_scn_send_scr()
5425 struct bfa_fcs_lport_s *port = scn->port; in bfa_fcs_lport_scn_scr_response() local
5429 bfa_trc(port->fcs, port->port_cfg.pwwn); in bfa_fcs_lport_scn_scr_response()
5435 bfa_trc(port->fcs, req_status); in bfa_fcs_lport_scn_scr_response()
5452 bfa_trc(port->fcs, ls_rjt->reason_code); in bfa_fcs_lport_scn_scr_response()
5453 bfa_trc(port->fcs, ls_rjt->reason_code_expl); in bfa_fcs_lport_scn_scr_response()
5467 bfa_fcs_lport_scn_send_ls_acc(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_scn_send_ls_acc() argument
5475 bfa_trc(port->fcs, rx_fchs->s_id); in bfa_fcs_lport_scn_send_ls_acc()
5477 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE); in bfa_fcs_lport_scn_send_ls_acc()
5482 rx_fchs->s_id, bfa_fcs_lport_get_fcid(port), in bfa_fcs_lport_scn_send_ls_acc()
5485 bfa_fcxp_send(fcxp, bfa_rport, port->fabric->vf_id, port->lp_tag, in bfa_fcs_lport_scn_send_ls_acc()
5521 bfa_fcs_lport_scn_init(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_scn_init() argument
5523 struct bfa_fcs_lport_scn_s *scn = BFA_FCS_GET_SCN_FROM_PORT(port); in bfa_fcs_lport_scn_init()
5525 scn->port = port; in bfa_fcs_lport_scn_init()
5530 bfa_fcs_lport_scn_offline(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_scn_offline() argument
5532 struct bfa_fcs_lport_scn_s *scn = BFA_FCS_GET_SCN_FROM_PORT(port); in bfa_fcs_lport_scn_offline()
5534 scn->port = port; in bfa_fcs_lport_scn_offline()
5539 bfa_fcs_lport_fab_scn_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_fab_scn_online() argument
5541 struct bfa_fcs_lport_scn_s *scn = BFA_FCS_GET_SCN_FROM_PORT(port); in bfa_fcs_lport_fab_scn_online()
5543 scn->port = port; in bfa_fcs_lport_fab_scn_online()
5548 bfa_fcs_lport_scn_portid_rscn(struct bfa_fcs_lport_s *port, u32 rpid) in bfa_fcs_lport_scn_portid_rscn() argument
5551 struct bfa_fcs_fabric_s *fabric = port->fabric; in bfa_fcs_lport_scn_portid_rscn()
5555 bfa_trc(port->fcs, rpid); in bfa_fcs_lport_scn_portid_rscn()
5574 rport = bfa_fcs_lport_get_rport_by_pid(port, rpid); in bfa_fcs_lport_scn_portid_rscn()
5576 rport = bfa_fcs_lport_get_rport_by_old_pid(port, rpid); in bfa_fcs_lport_scn_portid_rscn()
5583 if (!__fcs_min_cfg(port->fcs)) in bfa_fcs_lport_scn_portid_rscn()
5584 rport = bfa_fcs_rport_create(port, rpid); in bfa_fcs_lport_scn_portid_rscn()
5601 bfa_fcs_lport_scn_multiport_rscn(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_scn_multiport_rscn() argument
5609 bfa_trc(port->fcs, format); in bfa_fcs_lport_scn_multiport_rscn()
5610 bfa_trc(port->fcs, rscn_pid); in bfa_fcs_lport_scn_multiport_rscn()
5614 list_for_each_safe(qe, qe_next, &port->rport_q) { in bfa_fcs_lport_scn_multiport_rscn()
5624 bfa_fcs_lport_scn_process_rscn(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_scn_process_rscn() argument
5637 bfa_trc(port->fcs, num_entries); in bfa_fcs_lport_scn_process_rscn()
5639 port->stats.num_rscn++; in bfa_fcs_lport_scn_process_rscn()
5641 bfa_fcs_lport_scn_send_ls_acc(port, fchs); in bfa_fcs_lport_scn_process_rscn()
5646 bfa_trc(port->fcs, rscn->event[i].format); in bfa_fcs_lport_scn_process_rscn()
5647 bfa_trc(port->fcs, rscn_pid); in bfa_fcs_lport_scn_process_rscn()
5660 bfa_trc(port->fcs, rscn_pid); in bfa_fcs_lport_scn_process_rscn()
5671 bfa_trc(port->fcs, rscn_pid); in bfa_fcs_lport_scn_process_rscn()
5673 port->stats.num_portid_rscn++; in bfa_fcs_lport_scn_process_rscn()
5674 bfa_fcs_lport_scn_portid_rscn(port, rscn_pid); in bfa_fcs_lport_scn_process_rscn()
5681 bfa_fcs_lport_ms_fabric_rscn(port); in bfa_fcs_lport_scn_process_rscn()
5689 bfa_fcs_lport_scn_multiport_rscn(port, in bfa_fcs_lport_scn_process_rscn()
5706 bfa_fcs_lport_ns_query(port); in bfa_fcs_lport_scn_process_rscn()
5722 bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn, int index, in bfa_fcs_lport_get_rport() argument
5730 if (port == NULL || nrports == 0) in bfa_fcs_lport_get_rport()
5733 fcs = port->fcs; in bfa_fcs_lport_get_rport()
5737 qh = &port->rport_q; in bfa_fcs_lport_get_rport()
5770 bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_get_rport_quals() argument
5778 if (port == NULL || rports == NULL || *nrports == 0) in bfa_fcs_lport_get_rport_quals()
5781 fcs = port->fcs; in bfa_fcs_lport_get_rport_quals()
5785 qh = &port->rport_q; in bfa_fcs_lport_get_rport_quals()
5821 bfa_fcs_lport_get_rport_max_speed(bfa_fcs_lport_t *port) in bfa_fcs_lport_get_rport_max_speed() argument
5829 bfa_boolean_t trl_enabled = bfa_fcport_is_ratelim(port->fcs->bfa); in bfa_fcs_lport_get_rport_max_speed()
5832 if (port == NULL) in bfa_fcs_lport_get_rport_max_speed()
5835 fcs = port->fcs; in bfa_fcs_lport_get_rport_max_speed()
5838 bfa_fcport_get_attr(port->fcs->bfa, &port_attr); in bfa_fcs_lport_get_rport_max_speed()
5842 qh = &port->rport_q; in bfa_fcs_lport_get_rport_max_speed()
5859 bfa_fcport_get_ratelim_speed(port->fcs->bfa); in bfa_fcs_lport_get_rport_max_speed()
5903 bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port, in bfa_fcs_lport_get_info() argument
5907 bfa_trc(port->fcs, port->fabric->fabric_name); in bfa_fcs_lport_get_info()
5909 if (port->vport == NULL) { in bfa_fcs_lport_get_info()
5921 port_info->port_wwn = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_get_info()
5922 port_info->node_wwn = bfa_fcs_lport_get_nwwn(port); in bfa_fcs_lport_get_info()
5925 bfa_lps_get_max_vport(port->fcs->bfa); in bfa_fcs_lport_get_info()
5927 port->fabric->num_vports; in bfa_fcs_lport_get_info()
5929 port_info->num_rports_inuse = port->num_rports; in bfa_fcs_lport_get_info()
5942 port_info->port_wwn = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_lport_get_info()
5943 port_info->node_wwn = bfa_fcs_lport_get_nwwn(port); in bfa_fcs_lport_get_info()
5964 bfa_fcs_lport_lip_scn_online(struct bfa_fcs_lport_s *port) in bfa_fcs_lport_lip_scn_online() argument
5966 bfa_fcs_lport_loop_online(port); in bfa_fcs_lport_lip_scn_online()
6490 bfa_fcs_vport_aen_post(struct bfa_fcs_lport_s *port, in bfa_fcs_vport_aen_post() argument
6493 struct bfad_s *bfad = (struct bfad_s *)port->fabric->fcs->bfad; in bfa_fcs_vport_aen_post()
6500 aen_entry->aen_data.lport.vf_id = port->fabric->vf_id; in bfa_fcs_vport_aen_post()
6501 aen_entry->aen_data.lport.roles = port->port_cfg.roles; in bfa_fcs_vport_aen_post()
6503 bfa_fcs_get_base_port(port->fcs)); in bfa_fcs_vport_aen_post()
6504 aen_entry->aen_data.lport.lpwwn = bfa_fcs_lport_get_pwwn(port); in bfa_fcs_vport_aen_post()
6507 bfad_im_post_vendor_event(aen_entry, bfad, ++port->fcs->fcs_aen_seq, in bfa_fcs_vport_aen_post()