Lines Matching full:fcs

12  *  bfa_fcs.c BFA FCS main
20 BFA_TRC_FILE(FCS, FCS);
23 * fcs_api BFA FCS API
29 struct bfa_fcs_s *fcs = fcs_cbarg; in bfa_fcs_exit_comp() local
30 struct bfad_s *bfad = fcs->bfad; in bfa_fcs_exit_comp()
36 * fcs initialization, called once after bfa initialization is complete
39 bfa_fcs_init(struct bfa_fcs_s *fcs) in bfa_fcs_init() argument
41 bfa_sm_send_event(&fcs->fabric, BFA_FCS_FABRIC_SM_CREATE); in bfa_fcs_init()
42 bfa_trc(fcs, 0); in bfa_fcs_init()
46 * fcs_api BFA FCS API
50 * FCS update cfg - reset the pwwn/nwwn of fabric base logical port
54 bfa_fcs_update_cfg(struct bfa_fcs_s *fcs) in bfa_fcs_update_cfg() argument
56 struct bfa_fcs_fabric_s *fabric = &fcs->fabric; in bfa_fcs_update_cfg()
58 struct bfa_ioc_s *ioc = &fabric->fcs->bfa->ioc; in bfa_fcs_update_cfg()
65 * Stop FCS operations.
68 bfa_fcs_stop(struct bfa_fcs_s *fcs) in bfa_fcs_stop() argument
70 bfa_wc_init(&fcs->wc, bfa_fcs_exit_comp, fcs); in bfa_fcs_stop()
71 bfa_wc_up(&fcs->wc); in bfa_fcs_stop()
72 bfa_fcs_fabric_modstop(fcs); in bfa_fcs_stop()
73 bfa_wc_wait(&fcs->wc); in bfa_fcs_stop()
77 * fcs pbc vport initialization
80 bfa_fcs_pbc_vport_init(struct bfa_fcs_s *fcs) in bfa_fcs_pbc_vport_init() argument
86 if (!fcs->min_cfg) { in bfa_fcs_pbc_vport_init()
88 bfa_iocfc_get_pbc_vports(fcs->bfa, pbc_vports); in bfa_fcs_pbc_vport_init()
90 bfa_fcb_pbc_vport_create(fcs->bfa->bfad, pbc_vports[i]); in bfa_fcs_pbc_vport_init()
96 * FCS driver details initialization.
98 * param[in] fcs FCS instance
104 bfa_fcs_driver_info_init(struct bfa_fcs_s *fcs, in bfa_fcs_driver_info_init() argument
108 fcs->driver_info = *driver_info; in bfa_fcs_driver_info_init()
110 bfa_fcs_fabric_psymb_init(&fcs->fabric); in bfa_fcs_driver_info_init()
111 bfa_fcs_fabric_nsymb_init(&fcs->fabric); in bfa_fcs_driver_info_init()
116 * FCS instance cleanup and exit.
118 * param[in] fcs FCS instance
122 bfa_fcs_exit(struct bfa_fcs_s *fcs) in bfa_fcs_exit() argument
124 bfa_wc_init(&fcs->wc, bfa_fcs_exit_comp, fcs); in bfa_fcs_exit()
125 bfa_wc_up(&fcs->wc); in bfa_fcs_exit()
126 bfa_trc(fcs, 0); in bfa_fcs_exit()
127 bfa_lps_delete(fcs->fabric.lps); in bfa_fcs_exit()
128 bfa_sm_send_event(&fcs->fabric, BFA_FCS_FABRIC_SM_DELETE); in bfa_fcs_exit()
129 bfa_wc_wait(&fcs->wc); in bfa_fcs_exit()
140 if (bfa_fcport_get_topology((__fabric)->fcs->bfa) \
207 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_uninit()
208 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_uninit()
222 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_uninit()
233 struct bfa_s *bfa = fabric->fcs->bfa; in bfa_fcs_fabric_sm_created()
235 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_created()
236 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_created()
240 if (!bfa_fcport_is_linkup(fabric->fcs->bfa)) { in bfa_fcs_fabric_sm_created()
269 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_created()
281 struct bfa_s *bfa = fabric->fcs->bfa; in bfa_fcs_fabric_sm_linkdown()
283 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_linkdown()
284 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_linkdown()
316 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_linkdown()
327 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_flogi()
328 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_flogi()
333 bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa, in bfa_fcs_fabric_sm_flogi()
339 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_flogi()
348 bfa_timer_start(fabric->fcs->bfa, &fabric->delay_timer, in bfa_fcs_fabric_sm_flogi()
361 bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa, in bfa_fcs_fabric_sm_flogi()
379 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_flogi()
388 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_flogi_retry()
389 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_flogi_retry()
409 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_flogi_retry()
420 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_auth()
421 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_auth()
449 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_auth()
460 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_auth_failed()
461 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_auth_failed()
475 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_auth_failed()
486 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_loopback()
487 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_loopback()
501 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_loopback()
512 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_nofabric()
513 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_nofabric()
528 bfa_trc(fabric->fcs, fabric->bb_credit); in bfa_fcs_fabric_sm_nofabric()
529 bfa_fcport_set_tx_bbcredit(fabric->fcs->bfa, in bfa_fcs_fabric_sm_nofabric()
537 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_nofabric()
548 struct bfa_s *bfa = fabric->fcs->bfa; in bfa_fcs_fabric_sm_online()
550 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_online()
551 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_online()
583 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_online()
594 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_evfp()
595 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_evfp()
607 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_evfp()
618 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_evfp_done()
619 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_evfp_done()
629 struct bfad_s *bfad = (struct bfad_s *)fabric->fcs->bfad; in bfa_fcs_fabric_sm_isolated()
632 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_isolated()
633 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_isolated()
639 pwwn_ptr, fabric->fcs->port_vfid, in bfa_fcs_fabric_sm_isolated()
650 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_deleting()
651 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_deleting()
656 bfa_wc_down(&fabric->fcs->wc); in bfa_fcs_fabric_sm_deleting()
667 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_deleting()
678 struct bfa_s *bfa = fabric->fcs->bfa; in bfa_fcs_fabric_sm_stopping()
680 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_stopping()
681 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_stopping()
704 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_stopping()
715 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_sm_cleanup()
716 bfa_trc(fabric->fcs, event); in bfa_fcs_fabric_sm_cleanup()
722 bfa_wc_down(&(fabric->fcs)->wc); in bfa_fcs_fabric_sm_cleanup()
733 bfa_sm_fault(fabric->fcs, event); in bfa_fcs_fabric_sm_cleanup()
747 port_cfg->nwwn = fabric->fcs->bfa->ioc.attr->nwwn; in bfa_fcs_fabric_init()
748 port_cfg->pwwn = fabric->fcs->bfa->ioc.attr->pwwn; in bfa_fcs_fabric_init()
759 struct bfa_fcs_driver_info_s *driver_info = &fabric->fcs->driver_info; in bfa_fcs_fabric_psymb_init()
761 bfa_ioc_get_adapter_model(&fabric->fcs->bfa->ioc, model); in bfa_fcs_fabric_psymb_init()
820 struct bfa_fcs_driver_info_s *driver_info = &fabric->fcs->driver_info; in bfa_fcs_fabric_nsymb_init()
822 bfa_ioc_get_adapter_model(&fabric->fcs->bfa->ioc, model); in bfa_fcs_fabric_nsymb_init()
858 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_cb_lps_flogi_comp()
859 bfa_trc(fabric->fcs, status); in bfa_cb_lps_flogi_comp()
902 bfa_trc(fabric->fcs, fabric->bb_credit); in bfa_cb_lps_flogi_comp()
925 bfa_trc(fabric->fcs, fabric->bport.pid); in bfa_cb_lps_flogi_comp()
926 bfa_trc(fabric->fcs, fabric->is_npiv); in bfa_cb_lps_flogi_comp()
927 bfa_trc(fabric->fcs, fabric->is_auth); in bfa_cb_lps_flogi_comp()
935 struct bfa_s *bfa = fabric->fcs->bfa; in bfa_fcs_fabric_login()
952 bfa_trc(fabric->fcs, fabric->fabric_name); in bfa_fcs_fabric_notify_online()
974 bfa_trc(fabric->fcs, fabric->fabric_name); in bfa_fcs_fabric_notify_offline()
1060 * Fabric module stop -- stop FCS actions
1063 bfa_fcs_fabric_modstop(struct bfa_fcs_s *fcs) in bfa_fcs_fabric_modstop() argument
1067 bfa_trc(fcs, 0); in bfa_fcs_fabric_modstop()
1068 fabric = &fcs->fabric; in bfa_fcs_fabric_modstop()
1073 * Fabric module start -- kick starts FCS actions
1076 bfa_fcs_fabric_modstart(struct bfa_fcs_s *fcs) in bfa_fcs_fabric_modstart() argument
1080 bfa_trc(fcs, 0); in bfa_fcs_fabric_modstart()
1081 fabric = &fcs->fabric; in bfa_fcs_fabric_modstart()
1092 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_link_up()
1102 bfa_trc(fabric->fcs, fabric->bport.port_cfg.pwwn); in bfa_fcs_fabric_link_down()
1124 bfa_trc(fabric->fcs, fabric->vf_id); in bfa_fcs_fabric_addvport()
1203 bfa_trc(fabric->fcs, len); in bfa_fcs_fabric_uf_recv()
1204 bfa_trc(fabric->fcs, pid); in bfa_fcs_fabric_uf_recv()
1222 bfa_trc(fabric->fcs, pid); in bfa_fcs_fabric_uf_recv()
1231 bfa_trc(fabric->fcs, els_cmd->els_code); in bfa_fcs_fabric_uf_recv()
1233 bfa_trc(fabric->fcs, els_cmd->els_code); in bfa_fcs_fabric_uf_recv()
1237 bfa_trc(fabric->fcs, *(u8 *) ((u8 *) fchs)); in bfa_fcs_fabric_uf_recv()
1256 bfa_trc(fabric->fcs, fchs->type); in bfa_fcs_fabric_uf_recv()
1268 bfa_trc(fabric->fcs, els_cmd->els_code); in bfa_fcs_fabric_process_uf()
1293 bfa_trc(fabric->fcs, fchs->s_id); in bfa_fcs_fabric_process_flogi()
1303 bfa_trc(fabric->fcs, flogi->port_name); in bfa_fcs_fabric_process_flogi()
1324 struct bfa_s *bfa = fabric->fcs->bfa; in bfa_fcs_fabric_send_flogi_acc()
1329 fcxp = bfa_fcs_fcxp_alloc(fabric->fcs, BFA_FALSE); in bfa_fcs_fabric_send_flogi_acc()
1359 bfa_trc(fabric->fcs, status); in bfa_fcs_fabric_flogiacc_comp()
1370 struct bfad_s *bfad = (struct bfad_s *)port->fabric->fcs->bfad; in bfa_fcs_fabric_aen_post()
1381 bfad_im_post_vendor_event(aen_entry, bfad, ++port->fcs->fcs_aen_seq, in bfa_fcs_fabric_aen_post()
1396 struct bfad_s *bfad = (struct bfad_s *)fabric->fcs->bfad; in bfa_fcs_fabric_set_fabric_name()
1400 bfa_trc(fabric->fcs, fabric_name); in bfa_fcs_fabric_set_fabric_name()
1429 * Returns FCS vf structure for a given vf_id.
1434 * If lookup succeeds, returns fcs vf object, otherwise returns NULL
1437 bfa_fcs_vf_lookup(struct bfa_fcs_s *fcs, u16 vf_id) in bfa_fcs_vf_lookup() argument
1439 bfa_trc(fcs, vf_id); in bfa_fcs_vf_lookup()
1441 return &fcs->fabric; in bfa_fcs_vf_lookup()
1461 struct bfa_fcs_s *fcs; in bfa_fcs_vf_get_ports() local
1466 fcs = vf->fcs; in bfa_fcs_vf_get_ports()
1468 bfa_trc(fcs, vf->vf_id); in bfa_fcs_vf_get_ports()
1469 bfa_trc(fcs, (uint32_t) *nlports); in bfa_fcs_vf_get_ports()
1481 bfa_trc(fcs, i); in bfa_fcs_vf_get_ports()
1486 * BFA FCS PPORT ( physical port)
1491 struct bfa_fcs_s *fcs = cbarg; in bfa_fcs_port_event_handler() local
1493 bfa_trc(fcs, event); in bfa_fcs_port_event_handler()
1497 bfa_fcs_fabric_link_up(&fcs->fabric); in bfa_fcs_port_event_handler()
1501 bfa_fcs_fabric_link_down(&fcs->fabric); in bfa_fcs_port_event_handler()
1510 * BFA FCS UF ( Unsolicited Frames)
1524 struct bfa_fcs_s *fcs = (struct bfa_fcs_s *) cbarg; in bfa_fcs_uf_recv() local
1535 bfa_stats(fcs, uf.tagged); in bfa_fcs_uf_recv()
1537 if (fcs->port_vfid == vft->vf_id) in bfa_fcs_uf_recv()
1538 fabric = &fcs->fabric; in bfa_fcs_uf_recv()
1540 fabric = bfa_fcs_vf_lookup(fcs, (u16) vft->vf_id); in bfa_fcs_uf_recv()
1547 bfa_stats(fcs, uf.vfid_unknown); in bfa_fcs_uf_recv()
1558 bfa_trc(fcs, vft->vf_id); in bfa_fcs_uf_recv()
1560 bfa_stats(fcs, uf.untagged); in bfa_fcs_uf_recv()
1561 fabric = &fcs->fabric; in bfa_fcs_uf_recv()
1564 bfa_trc(fcs, ((u32 *) fchs)[0]); in bfa_fcs_uf_recv()
1565 bfa_trc(fcs, ((u32 *) fchs)[1]); in bfa_fcs_uf_recv()
1566 bfa_trc(fcs, ((u32 *) fchs)[2]); in bfa_fcs_uf_recv()
1567 bfa_trc(fcs, ((u32 *) fchs)[3]); in bfa_fcs_uf_recv()
1568 bfa_trc(fcs, ((u32 *) fchs)[4]); in bfa_fcs_uf_recv()
1569 bfa_trc(fcs, ((u32 *) fchs)[5]); in bfa_fcs_uf_recv()
1570 bfa_trc(fcs, len); in bfa_fcs_uf_recv()
1577 * fcs attach -- called once to initialize data structures at driver attach time
1580 bfa_fcs_attach(struct bfa_fcs_s *fcs, struct bfa_s *bfa, struct bfad_s *bfad, in bfa_fcs_attach() argument
1583 struct bfa_fcs_fabric_s *fabric = &fcs->fabric; in bfa_fcs_attach()
1585 fcs->bfa = bfa; in bfa_fcs_attach()
1586 fcs->bfad = bfad; in bfa_fcs_attach()
1587 fcs->min_cfg = min_cfg; in bfa_fcs_attach()
1588 fcs->num_rport_logins = 0; in bfa_fcs_attach()
1590 bfa->fcs = BFA_TRUE; in bfa_fcs_attach()
1593 bfa_fcport_event_register(fcs->bfa, bfa_fcs_port_event_handler, fcs); in bfa_fcs_attach()
1594 bfa_uf_recv_register(fcs->bfa, bfa_fcs_uf_recv, fcs); in bfa_fcs_attach()
1601 fabric->fcs = fcs; in bfa_fcs_attach()
1604 fabric->lps = bfa_lps_alloc(fcs->bfa); in bfa_fcs_attach()
1615 bfa_fcs_lport_attach(&fabric->bport, fabric->fcs, FC_VF_ID_NULL, NULL); in bfa_fcs_attach()