Lines Matching refs:bfa

53 #define BFA_PORT_IS_DISABLED(bfa) \  argument
54 ((bfa_fcport_is_disabled(bfa) == BFA_TRUE) || \
55 (bfa_ioc_is_disabled(&bfa->ioc) == BFA_TRUE))
91 if ((__rp)->bfa->fcs) \
94 bfa_cb_queue((__rp)->bfa, &(__rp)->hcb_qe, \
100 if ((__rp)->bfa->fcs) \
103 bfa_cb_queue((__rp)->bfa, &(__rp)->hcb_qe, \
112 static void hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp,
114 static void hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen,
124 struct bfa_meminfo_s *minfo, struct bfa_s *bfa);
125 static void bfa_lps_attach(struct bfa_s *bfa, void *bfad,
128 static void bfa_lps_detach(struct bfa_s *bfa);
129 static void bfa_lps_start(struct bfa_s *bfa);
130 static void bfa_lps_stop(struct bfa_s *bfa);
131 static void bfa_lps_iocdisable(struct bfa_s *bfa);
132 static void bfa_lps_login_rsp(struct bfa_s *bfa,
135 static void bfa_lps_logout_rsp(struct bfa_s *bfa,
176 static void bfa_trunk_iocdisable(struct bfa_s *bfa);
488 struct bfa_s *bfa) in bfa_fcxp_meminfo() argument
490 struct bfa_fcxp_mod_s *fcxp_mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_meminfo()
491 struct bfa_mem_kva_s *fcxp_kva = BFA_MEM_FCXP_KVA(bfa); in bfa_fcxp_meminfo()
525 bfa_fcxp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_fcxp_attach() argument
528 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_attach()
530 mod->bfa = bfa; in bfa_fcxp_attach()
547 bfa_fcxp_detach(struct bfa_s *bfa) in bfa_fcxp_detach() argument
552 bfa_fcxp_start(struct bfa_s *bfa) in bfa_fcxp_start() argument
557 bfa_fcxp_stop(struct bfa_s *bfa) in bfa_fcxp_stop() argument
562 bfa_fcxp_iocdisable(struct bfa_s *bfa) in bfa_fcxp_iocdisable() argument
564 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_iocdisable()
580 bfa_cb_queue(bfa, &fcxp->hcb_qe, in bfa_fcxp_iocdisable()
604 struct bfa_s *bfa, in bfa_fcxp_init_reqrsp() argument
615 WARN_ON(bfa == NULL); in bfa_fcxp_init_reqrsp()
617 bfa_trc(bfa, fcxp->fcxp_tag); in bfa_fcxp_init_reqrsp()
642 void *caller, struct bfa_s *bfa, int nreq_sgles, in bfa_fcxp_init() argument
649 WARN_ON(bfa == NULL); in bfa_fcxp_init()
651 bfa_trc(bfa, fcxp->fcxp_tag); in bfa_fcxp_init()
655 bfa_fcxp_init_reqrsp(fcxp, bfa, in bfa_fcxp_init()
660 bfa_fcxp_init_reqrsp(fcxp, bfa, in bfa_fcxp_init()
679 bfa_trc(mod->bfa, fcxp->fcxp_tag); in bfa_fcxp_put()
681 bfa_fcxp_init(fcxp, wqe->caller, wqe->bfa, wqe->nreq_sgles, in bfa_fcxp_put()
722 hal_fcxp_send_comp(struct bfa_s *bfa, struct bfi_fcxp_send_rsp_s *fcxp_rsp) in hal_fcxp_send_comp() argument
724 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in hal_fcxp_send_comp()
728 bfa_trc(bfa, fcxp_tag); in hal_fcxp_send_comp()
745 hal_fcxp_rx_plog(mod->bfa, fcxp, fcxp_rsp); in hal_fcxp_send_comp()
748 bfa_trc(mod->bfa, (NULL == fcxp->caller)); in hal_fcxp_send_comp()
763 bfa_cb_queue(bfa, &fcxp->hcb_qe, in hal_fcxp_send_comp()
767 bfa_trc(bfa, (NULL == fcxp->send_cbfn)); in hal_fcxp_send_comp()
772 hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen, struct bfa_fcxp_s *fcxp, in hal_fcxp_tx_plog() argument
783 bfa_plog_fchdr_and_pl(bfa->plog, BFA_PL_MID_HAL_FCXP, in hal_fcxp_tx_plog()
788 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP, in hal_fcxp_tx_plog()
794 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP, BFA_PL_EID_TX, in hal_fcxp_tx_plog()
800 hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp, in hal_fcxp_rx_plog() argument
808 bfa_plog_fchdr_and_pl(bfa->plog, BFA_PL_MID_HAL_FCXP, in hal_fcxp_rx_plog()
813 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP, in hal_fcxp_rx_plog()
819 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP, BFA_PL_EID_RX, in hal_fcxp_rx_plog()
831 struct bfa_s *bfa = fcxp->fcxp_mod->bfa; in bfa_fcxp_qresume() local
835 send_req = bfa_reqq_next(bfa, BFA_REQQ_FCXP); in bfa_fcxp_qresume()
845 struct bfa_s *bfa = fcxp->fcxp_mod->bfa; in bfa_fcxp_queue() local
851 bfa_fn_lpu(bfa)); in bfa_fcxp_queue()
865 send_req->lp_fwtag = bfa_lps_get_fwtag(bfa, reqi->lp_tag); in bfa_fcxp_queue()
911 hal_fcxp_tx_plog(bfa, reqi->req_tot_len, fcxp, &reqi->fchs); in bfa_fcxp_queue()
913 bfa_reqq_produce(bfa, BFA_REQQ_FCXP, send_req->mh); in bfa_fcxp_queue()
915 bfa_trc(bfa, bfa_reqq_pi(bfa, BFA_REQQ_FCXP)); in bfa_fcxp_queue()
916 bfa_trc(bfa, bfa_reqq_ci(bfa, BFA_REQQ_FCXP)); in bfa_fcxp_queue()
945 bfa_fcxp_req_rsp_alloc(void *caller, struct bfa_s *bfa, int nreq_sgles, in bfa_fcxp_req_rsp_alloc() argument
953 WARN_ON(bfa == NULL); in bfa_fcxp_req_rsp_alloc()
955 fcxp = bfa_fcxp_get(BFA_FCXP_MOD(bfa), req); in bfa_fcxp_req_rsp_alloc()
959 bfa_trc(bfa, fcxp->fcxp_tag); in bfa_fcxp_req_rsp_alloc()
961 bfa_fcxp_init(fcxp, caller, bfa, nreq_sgles, nrsp_sgles, req_sga_cbfn, in bfa_fcxp_req_rsp_alloc()
1029 bfa_trc(mod->bfa, fcxp->fcxp_tag); in bfa_fcxp_free()
1060 struct bfa_s *bfa = fcxp->fcxp_mod->bfa; in bfa_fcxp_send() local
1065 bfa_trc(bfa, fcxp->fcxp_tag); in bfa_fcxp_send()
1085 send_req = bfa_reqq_next(bfa, BFA_REQQ_FCXP); in bfa_fcxp_send()
1087 bfa_trc(bfa, fcxp->fcxp_tag); in bfa_fcxp_send()
1089 bfa_reqq_wait(bfa, BFA_REQQ_FCXP, &fcxp->reqq_wqe); in bfa_fcxp_send()
1106 bfa_trc(fcxp->fcxp_mod->bfa, fcxp->fcxp_tag); in bfa_fcxp_abort()
1112 bfa_fcxp_req_rsp_alloc_wait(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe, in bfa_fcxp_req_rsp_alloc_wait() argument
1120 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_req_rsp_alloc_wait()
1130 wqe->bfa = bfa; in bfa_fcxp_req_rsp_alloc_wait()
1145 bfa_fcxp_walloc_cancel(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe) in bfa_fcxp_walloc_cancel() argument
1147 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_walloc_cancel()
1172 bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg) in bfa_fcxp_isr() argument
1176 hal_fcxp_send_comp(bfa, (struct bfi_fcxp_send_rsp_s *) msg); in bfa_fcxp_isr()
1180 bfa_trc(bfa, msg->mhdr.msg_id); in bfa_fcxp_isr()
1186 bfa_fcxp_get_maxrsp(struct bfa_s *bfa) in bfa_fcxp_get_maxrsp() argument
1188 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_get_maxrsp()
1194 bfa_fcxp_res_recfg(struct bfa_s *bfa, u16 num_fcxp_fw) in bfa_fcxp_res_recfg() argument
1196 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); in bfa_fcxp_res_recfg()
1221 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_init()
1222 bfa_trc(lps->bfa, event); in bfa_lps_sm_init()
1226 if (bfa_reqq_full(lps->bfa, lps->reqq)) { in bfa_lps_sm_init()
1228 bfa_reqq_wait(lps->bfa, lps->reqq, &lps->wqe); in bfa_lps_sm_init()
1235 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_init()
1238 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_init()
1269 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_init()
1279 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_login()
1280 bfa_trc(lps->bfa, event); in bfa_lps_sm_login()
1287 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_login()
1290 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_login()
1293 bfa_trc(lps->bfa, lps->fport); in bfa_lps_sm_login()
1294 bfa_trc(lps->bfa, lps->lp_pid); in bfa_lps_sm_login()
1301 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_login()
1305 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_login()
1318 bfa_trc(lps->bfa, lps->fport); in bfa_lps_sm_login()
1319 bfa_trc(lps->bfa, lps->lp_pid); in bfa_lps_sm_login()
1323 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_login()
1333 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_loginwait()
1334 bfa_trc(lps->bfa, event); in bfa_lps_sm_loginwait()
1357 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_loginwait()
1367 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_online()
1368 bfa_trc(lps->bfa, event); in bfa_lps_sm_online()
1372 if (bfa_reqq_full(lps->bfa, lps->reqq)) { in bfa_lps_sm_online()
1374 bfa_reqq_wait(lps->bfa, lps->reqq, &lps->wqe); in bfa_lps_sm_online()
1379 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_online()
1388 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_online()
1393 if (bfa_reqq_full(lps->bfa, lps->reqq)) { in bfa_lps_sm_online()
1395 bfa_reqq_wait(lps->bfa, lps->reqq, &lps->wqe); in bfa_lps_sm_online()
1406 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_online()
1416 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_online_n2n_pid_wait()
1417 bfa_trc(lps->bfa, event); in bfa_lps_sm_online_n2n_pid_wait()
1427 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_online_n2n_pid_wait()
1437 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS, in bfa_lps_sm_online_n2n_pid_wait()
1448 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_online_n2n_pid_wait()
1458 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_logout()
1459 bfa_trc(lps->bfa, event); in bfa_lps_sm_logout()
1473 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_logout()
1483 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_sm_logowait()
1484 bfa_trc(lps->bfa, event); in bfa_lps_sm_logowait()
1499 bfa_sm_fault(lps->bfa, event); in bfa_lps_sm_logowait()
1514 struct bfa_s *bfa) in bfa_lps_meminfo() argument
1516 struct bfa_mem_kva_s *lps_kva = BFA_MEM_LPS_KVA(bfa); in bfa_lps_meminfo()
1530 bfa_lps_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_lps_attach() argument
1533 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_attach()
1551 lps->bfa = bfa; in bfa_lps_attach()
1560 bfa_lps_detach(struct bfa_s *bfa) in bfa_lps_detach() argument
1565 bfa_lps_start(struct bfa_s *bfa) in bfa_lps_start() argument
1570 bfa_lps_stop(struct bfa_s *bfa) in bfa_lps_stop() argument
1578 bfa_lps_iocdisable(struct bfa_s *bfa) in bfa_lps_iocdisable() argument
1580 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_iocdisable()
1599 bfa_lps_login_rsp(struct bfa_s *bfa, struct bfi_lps_login_rsp_s *rsp) in bfa_lps_login_rsp() argument
1601 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_login_rsp()
1654 struct bfa_s *bfa = first_lps->bfa; in bfa_lps_no_res() local
1655 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_no_res()
1659 bfa_trc(bfa, count); in bfa_lps_no_res()
1666 bfa_trc(bfa, lps->bfa_tag); in bfa_lps_no_res()
1680 bfa_lps_logout_rsp(struct bfa_s *bfa, struct bfi_lps_logout_rsp_s *rsp) in bfa_lps_logout_rsp() argument
1682 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_logout_rsp()
1695 bfa_lps_rx_cvl_event(struct bfa_s *bfa, struct bfi_lps_cvl_event_s *cvl) in bfa_lps_rx_cvl_event() argument
1697 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_rx_cvl_event()
1722 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa); in bfa_lps_free()
1735 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa); in bfa_lps_send_login()
1738 m = bfa_reqq_next(lps->bfa, lps->reqq); in bfa_lps_send_login()
1742 bfa_fn_lpu(lps->bfa)); in bfa_lps_send_login()
1752 bfa_reqq_produce(lps->bfa, lps->reqq, m->mh); in bfa_lps_send_login()
1765 m = bfa_reqq_next(lps->bfa, lps->reqq); in bfa_lps_send_logout()
1769 bfa_fn_lpu(lps->bfa)); in bfa_lps_send_logout()
1773 bfa_reqq_produce(lps->bfa, lps->reqq, m->mh); in bfa_lps_send_logout()
1784 m = bfa_reqq_next(lps->bfa, lps->reqq); in bfa_lps_send_set_n2n_pid()
1788 bfa_fn_lpu(lps->bfa)); in bfa_lps_send_set_n2n_pid()
1792 bfa_reqq_produce(lps->bfa, lps->reqq, m->mh); in bfa_lps_send_set_n2n_pid()
1807 bfa_cb_lps_fdisc_comp(lps->bfa->bfad, lps->uarg, lps->status); in bfa_lps_login_comp_cb()
1809 bfa_cb_lps_flogi_comp(lps->bfa->bfad, lps->uarg, lps->status); in bfa_lps_login_comp_cb()
1818 if (!lps->bfa->fcs) { in bfa_lps_login_comp()
1819 bfa_cb_queue(lps->bfa, &lps->hcb_qe, bfa_lps_login_comp_cb, in bfa_lps_login_comp()
1825 bfa_cb_lps_fdisc_comp(lps->bfa->bfad, lps->uarg, lps->status); in bfa_lps_login_comp()
1827 bfa_cb_lps_flogi_comp(lps->bfa->bfad, lps->uarg, lps->status); in bfa_lps_login_comp()
1842 bfa_cb_lps_fdisclogo_comp(lps->bfa->bfad, lps->uarg); in bfa_lps_logout_comp_cb()
1844 bfa_cb_lps_flogo_comp(lps->bfa->bfad, lps->uarg); in bfa_lps_logout_comp_cb()
1853 if (!lps->bfa->fcs) { in bfa_lps_logout_comp()
1854 bfa_cb_queue(lps->bfa, &lps->hcb_qe, bfa_lps_logout_comp_cb, in bfa_lps_logout_comp()
1859 bfa_cb_lps_fdisclogo_comp(lps->bfa->bfad, lps->uarg); in bfa_lps_logout_comp()
1875 bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg); in bfa_lps_cvl_event_cb()
1885 if (!lps->bfa->fcs) { in bfa_lps_cvl_event()
1886 bfa_cb_queue(lps->bfa, &lps->hcb_qe, bfa_lps_cvl_event_cb, in bfa_lps_cvl_event()
1893 bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg); in bfa_lps_cvl_event()
1903 bfa_lps_get_max_vport(struct bfa_s *bfa) in bfa_lps_get_max_vport() argument
1905 if (bfa_ioc_devid(&bfa->ioc) == BFA_PCI_DEVICE_ID_CT) in bfa_lps_get_max_vport()
1915 bfa_lps_alloc(struct bfa_s *bfa) in bfa_lps_alloc() argument
1917 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_alloc()
1986 bfa_lps_get_fwtag(struct bfa_s *bfa, u8 lp_tag) in bfa_lps_get_fwtag() argument
1988 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_get_fwtag()
1997 bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid) in bfa_lps_get_tag_from_pid() argument
1999 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_get_tag_from_pid()
2017 bfa_lps_get_base_pid(struct bfa_s *bfa) in bfa_lps_get_base_pid() argument
2019 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); in bfa_lps_get_base_pid()
2030 bfa_trc(lps->bfa, lps->bfa_tag); in bfa_lps_set_n2n_pid()
2031 bfa_trc(lps->bfa, n2n_pid); in bfa_lps_set_n2n_pid()
2041 bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *m) in bfa_lps_isr() argument
2045 bfa_trc(bfa, m->mhdr.msg_id); in bfa_lps_isr()
2050 bfa_lps_login_rsp(bfa, msg.login_rsp); in bfa_lps_isr()
2054 bfa_lps_logout_rsp(bfa, msg.logout_rsp); in bfa_lps_isr()
2058 bfa_lps_rx_cvl_event(bfa, msg.cvl_event); in bfa_lps_isr()
2062 bfa_trc(bfa, m->mhdr.msg_id); in bfa_lps_isr()
2070 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_aen_post()
2077 aen_entry->aen_data.port.ioc_type = bfa_get_type(fcport->bfa); in bfa_fcport_aen_post()
2081 bfad_im_post_vendor_event(aen_entry, bfad, ++fcport->bfa->bfa_aen_seq, in bfa_fcport_aen_post()
2092 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_uninit()
2102 bfa_trc(fcport->bfa, BFA_TRUE); in bfa_fcport_sm_uninit()
2105 bfa_trc(fcport->bfa, BFA_FALSE); in bfa_fcport_sm_uninit()
2132 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_uninit()
2141 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_enabling_qwait()
2142 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_enabling_qwait()
2168 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_enabling_qwait()
2196 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_enabling_qwait()
2205 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_enabling()
2206 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_enabling()
2235 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_enabling()
2258 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_enabling()
2268 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_linkdown()
2270 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_linkdown()
2277 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2279 if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) { in bfa_fcport_sm_linkdown()
2281 bfa_trc(fcport->bfa, in bfa_fcport_sm_linkdown()
2283 bfa_trc(fcport->bfa, in bfa_fcport_sm_linkdown()
2287 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2291 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2327 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkdown()
2350 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_linkdown()
2359 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_linkup()
2361 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_linkup()
2379 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkup()
2394 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_linkup()
2397 if (BFA_PORT_IS_DISABLED(fcport->bfa)) { in bfa_fcport_sm_linkup()
2413 if (BFA_PORT_IS_DISABLED(fcport->bfa)) { in bfa_fcport_sm_linkup()
2430 if (BFA_PORT_IS_DISABLED(fcport->bfa)) { in bfa_fcport_sm_linkup()
2449 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_linkup()
2457 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_disabling_qwait()
2500 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_disabling_qwait()
2508 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_toggling_qwait()
2547 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_toggling_qwait()
2556 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_disabling()
2557 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_disabling()
2577 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_disabling()
2602 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_disabling()
2611 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad; in bfa_fcport_sm_disabled()
2612 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_disabled()
2632 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_disabled()
2659 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_disabled()
2667 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_stopped()
2693 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_iocdown()
2719 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_iocfail()
2741 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_dport()
2766 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_dport()
2774 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_ddport()
2800 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_ddport()
2808 bfa_trc(fcport->bfa, event); in bfa_fcport_sm_faa_misconfig()
2827 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_fcport_sm_faa_misconfig()
2843 bfa_sm_fault(fcport->bfa, event); in bfa_fcport_sm_faa_misconfig()
2854 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn()
2863 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn()
2874 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_nf()
2886 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_nf()
2897 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_up_nf()
2910 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_dn_up_nf()
2921 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up()
2930 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up()
2941 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_nf()
2953 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_nf()
2964 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_nf()
2977 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_nf()
2988 bfa_trc(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_up_nf()
3001 bfa_sm_fault(ln->fcport->bfa, event); in bfa_fcport_ln_sm_up_dn_up_nf()
3044 if (fcport->bfa->fcs) { in bfa_fcport_queue_cb()
3049 bfa_cb_queue(fcport->bfa, &ln->ln_qe, in bfa_fcport_queue_cb()
3059 struct bfa_s *bfa) in bfa_fcport_meminfo() argument
3061 struct bfa_mem_dma_s *fcport_dma = BFA_MEM_FCPORT_DMA(bfa); in bfa_fcport_meminfo()
3089 bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_fcport_attach() argument
3092 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_attach()
3097 fcport->bfa = bfa; in bfa_fcport_attach()
3134 bfa_fcport_detach(struct bfa_s *bfa) in bfa_fcport_detach() argument
3142 bfa_fcport_start(struct bfa_s *bfa) in bfa_fcport_start() argument
3144 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_START); in bfa_fcport_start()
3151 bfa_fcport_stop(struct bfa_s *bfa) in bfa_fcport_stop() argument
3153 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_STOP); in bfa_fcport_stop()
3154 bfa_trunk_iocdisable(bfa); in bfa_fcport_stop()
3161 bfa_fcport_iocdisable(struct bfa_s *bfa) in bfa_fcport_iocdisable() argument
3163 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_iocdisable()
3166 bfa_trunk_iocdisable(bfa); in bfa_fcport_iocdisable()
3218 bfa_trc(fcport->bfa, fcport->speed); in bfa_fcport_update_linkinfo()
3219 bfa_trc(fcport->bfa, fcport->topology); in bfa_fcport_update_linkinfo()
3247 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_enable()
3249 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_enable()
3255 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_enable()
3263 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo); in bfa_fcport_send_enable()
3264 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_hi); in bfa_fcport_send_enable()
3269 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, m->mh); in bfa_fcport_send_enable()
3290 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_disable()
3292 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_disable()
3298 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_disable()
3304 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, m->mh); in bfa_fcport_send_disable()
3312 fcport->pwwn = fcport->bfa->ioc.attr->pwwn; in bfa_fcport_set_wwns()
3313 fcport->nwwn = fcport->bfa->ioc.attr->nwwn; in bfa_fcport_set_wwns()
3315 bfa_trc(fcport->bfa, fcport->pwwn); in bfa_fcport_set_wwns()
3316 bfa_trc(fcport->bfa, fcport->nwwn); in bfa_fcport_set_wwns()
3371 if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) in __bfa_cb_fcport_stats_get()
3381 bfa_cb_queue_status(fcport->bfa, &cb->hcb_qe, in __bfa_cb_fcport_stats_get()
3396 bfa_trc(fcport->bfa, fcport->stats_qfull); in bfa_fcport_stats_get_timeout()
3413 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_stats_get()
3419 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_stats_get()
3427 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_stats_get()
3428 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, msg->mh); in bfa_fcport_send_stats_get()
3449 bfa_cb_queue_status(fcport->bfa, &cb->hcb_qe, in __bfa_cb_fcport_stats_clr()
3464 bfa_trc(fcport->bfa, fcport->stats_qfull); in bfa_fcport_stats_clr_timeout()
3481 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT); in bfa_fcport_send_stats_clear()
3487 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT, in bfa_fcport_send_stats_clear()
3495 bfa_fn_lpu(fcport->bfa)); in bfa_fcport_send_stats_clear()
3496 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, msg->mh); in bfa_fcport_send_stats_clear()
3512 bfa_trc(fcport->bfa, fcport->cfg.trunked); in bfa_trunk_scn()
3516 bfa_trc(fcport->bfa, trunk->attr.state); in bfa_trunk_scn()
3517 bfa_trc(fcport->bfa, scn->trunk_state); in bfa_trunk_scn()
3518 bfa_trc(fcport->bfa, scn->trunk_speed); in bfa_trunk_scn()
3543 bfa_trc(fcport->bfa, lattr->link_state); in bfa_trunk_scn()
3544 bfa_trc(fcport->bfa, lattr->trunk_wwn); in bfa_trunk_scn()
3545 bfa_trc(fcport->bfa, lattr->fctl); in bfa_trunk_scn()
3546 bfa_trc(fcport->bfa, lattr->speed); in bfa_trunk_scn()
3547 bfa_trc(fcport->bfa, lattr->deskew); in bfa_trunk_scn()
3552 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3556 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3560 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3564 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL, in bfa_trunk_scn()
3579 bfa_trunk_iocdisable(struct bfa_s *bfa) in bfa_trunk_iocdisable() argument
3581 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_trunk_iocdisable()
3610 bfa_fcport_init(struct bfa_s *bfa) in bfa_fcport_init() argument
3612 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_init()
3619 fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc); in bfa_fcport_init()
3620 fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc); in bfa_fcport_init()
3621 fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc); in bfa_fcport_init()
3623 if (bfa_fcport_is_pbcdisabled(bfa)) in bfa_fcport_init()
3624 bfa->modules.port.pbc_disabled = BFA_TRUE; in bfa_fcport_init()
3635 bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg) in bfa_fcport_isr() argument
3637 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_isr()
3643 bfa_trc(bfa, msg->mhdr.msg_id); in bfa_fcport_isr()
3644 bfa_trc(bfa, bfa_sm_to_state(hal_port_sm_table, fcport->sm)); in bfa_fcport_isr()
3762 bfa_fcport_event_register(struct bfa_s *bfa, in bfa_fcport_event_register() argument
3767 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_event_register()
3774 bfa_fcport_enable(struct bfa_s *bfa) in bfa_fcport_enable() argument
3776 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_enable()
3778 if (bfa_fcport_is_pbcdisabled(bfa)) in bfa_fcport_enable()
3781 if (bfa_ioc_is_disabled(&bfa->ioc)) in bfa_fcport_enable()
3787 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_ENABLE); in bfa_fcport_enable()
3792 bfa_fcport_disable(struct bfa_s *bfa) in bfa_fcport_disable() argument
3794 if (bfa_fcport_is_pbcdisabled(bfa)) in bfa_fcport_disable()
3797 if (bfa_ioc_is_disabled(&bfa->ioc)) in bfa_fcport_disable()
3800 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DISABLE); in bfa_fcport_disable()
3806 bfa_fcport_is_pbcdisabled(struct bfa_s *bfa) in bfa_fcport_is_pbcdisabled() argument
3808 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_pbcdisabled()
3809 struct bfa_iocfc_s *iocfc = &bfa->iocfc; in bfa_fcport_is_pbcdisabled()
3813 bfa_trc(bfa, fcport->pwwn); in bfa_fcport_is_pbcdisabled()
3823 bfa_fcport_cfg_speed(struct bfa_s *bfa, enum bfa_port_speed speed) in bfa_fcport_cfg_speed() argument
3825 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_speed()
3827 bfa_trc(bfa, speed); in bfa_fcport_cfg_speed()
3835 bfa_trc(bfa, fcport->speed_sup); in bfa_fcport_cfg_speed()
3840 if (bfa_ioc_get_type(&fcport->bfa->ioc) == BFA_IOC_TYPE_FC) { in bfa_fcport_cfg_speed()
3843 (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id))) in bfa_fcport_cfg_speed()
3868 bfa_fcport_get_speed(struct bfa_s *bfa) in bfa_fcport_get_speed() argument
3870 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_speed()
3879 bfa_fcport_cfg_topology(struct bfa_s *bfa, enum bfa_port_topology topology) in bfa_fcport_cfg_topology() argument
3881 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_topology()
3883 bfa_trc(bfa, topology); in bfa_fcport_cfg_topology()
3884 bfa_trc(bfa, fcport->cfg.topology); in bfa_fcport_cfg_topology()
3891 if ((bfa_fcport_is_qos_enabled(bfa) != BFA_FALSE) || in bfa_fcport_cfg_topology()
3896 if ((bfa_fcport_is_trunk_enabled(bfa) != BFA_FALSE) || in bfa_fcport_cfg_topology()
3899 if ((bfa_fcport_get_speed(bfa) == BFA_PORT_SPEED_16GBPS) || in bfa_fcport_cfg_topology()
3902 if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type)) in bfa_fcport_cfg_topology()
3904 if (bfa_fcport_is_dport(bfa) != BFA_FALSE) in bfa_fcport_cfg_topology()
3906 if (bfa_fcport_is_ddport(bfa) != BFA_FALSE) in bfa_fcport_cfg_topology()
3925 bfa_fcport_get_topology(struct bfa_s *bfa) in bfa_fcport_get_topology() argument
3927 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_topology()
3936 bfa_fcport_get_cfg_topology(struct bfa_s *bfa) in bfa_fcport_get_cfg_topology() argument
3938 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_cfg_topology()
3944 bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa) in bfa_fcport_cfg_hardalpa() argument
3946 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_hardalpa()
3948 bfa_trc(bfa, alpa); in bfa_fcport_cfg_hardalpa()
3949 bfa_trc(bfa, fcport->cfg.cfg_hardalpa); in bfa_fcport_cfg_hardalpa()
3950 bfa_trc(bfa, fcport->cfg.hardalpa); in bfa_fcport_cfg_hardalpa()
3959 bfa_fcport_clr_hardalpa(struct bfa_s *bfa) in bfa_fcport_clr_hardalpa() argument
3961 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_clr_hardalpa()
3963 bfa_trc(bfa, fcport->cfg.cfg_hardalpa); in bfa_fcport_clr_hardalpa()
3964 bfa_trc(bfa, fcport->cfg.hardalpa); in bfa_fcport_clr_hardalpa()
3971 bfa_fcport_get_hardalpa(struct bfa_s *bfa, u8 *alpa) in bfa_fcport_get_hardalpa() argument
3973 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_hardalpa()
3980 bfa_fcport_get_myalpa(struct bfa_s *bfa) in bfa_fcport_get_myalpa() argument
3982 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_myalpa()
3988 bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxfrsize) in bfa_fcport_cfg_maxfrsize() argument
3990 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_maxfrsize()
3992 bfa_trc(bfa, maxfrsize); in bfa_fcport_cfg_maxfrsize()
3993 bfa_trc(bfa, fcport->cfg.maxfrsize); in bfa_fcport_cfg_maxfrsize()
4008 bfa_fcport_get_maxfrsize(struct bfa_s *bfa) in bfa_fcport_get_maxfrsize() argument
4010 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_maxfrsize()
4016 bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa) in bfa_fcport_get_rx_bbcredit() argument
4018 if (bfa_fcport_get_topology(bfa) != BFA_PORT_TOPOLOGY_LOOP) in bfa_fcport_get_rx_bbcredit()
4019 return (BFA_FCPORT_MOD(bfa))->cfg.rx_bbcredit; in bfa_fcport_get_rx_bbcredit()
4026 bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit) in bfa_fcport_set_tx_bbcredit() argument
4028 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_set_tx_bbcredit()
4038 bfa_fcport_get_wwn(struct bfa_s *bfa, bfa_boolean_t node) in bfa_fcport_get_wwn() argument
4040 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_wwn()
4048 bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr) in bfa_fcport_get_attr() argument
4050 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_attr()
4057 attr->factorypwwn = bfa->ioc.attr->mfg_pwwn; in bfa_fcport_get_attr()
4058 attr->factorynwwn = bfa->ioc.attr->mfg_nwwn; in bfa_fcport_get_attr()
4077 attr->pport_cfg.path_tov = bfa_fcpim_path_tov_get(bfa); in bfa_fcport_get_attr()
4078 attr->pport_cfg.q_depth = bfa_fcpim_qdepth_get(bfa); in bfa_fcport_get_attr()
4084 if (bfa_fcport_is_pbcdisabled(bfa)) in bfa_fcport_get_attr()
4087 if (bfa_ioc_is_disabled(&fcport->bfa->ioc)) in bfa_fcport_get_attr()
4089 else if (bfa_ioc_fw_mismatch(&fcport->bfa->ioc)) in bfa_fcport_get_attr()
4103 bfa_fcport_get_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb) in bfa_fcport_get_stats() argument
4105 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_stats()
4107 if (!bfa_iocfc_is_operational(bfa) || in bfa_fcport_get_stats()
4117 bfa_timer_start(bfa, &fcport->timer, in bfa_fcport_get_stats()
4130 bfa_fcport_clear_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb) in bfa_fcport_clear_stats() argument
4132 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_clear_stats()
4134 if (!bfa_iocfc_is_operational(bfa) || in bfa_fcport_clear_stats()
4144 bfa_timer_start(bfa, &fcport->timer, in bfa_fcport_clear_stats()
4157 bfa_fcport_is_disabled(struct bfa_s *bfa) in bfa_fcport_is_disabled() argument
4159 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_disabled()
4167 bfa_fcport_is_dport(struct bfa_s *bfa) in bfa_fcport_is_dport() argument
4169 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_dport()
4176 bfa_fcport_is_ddport(struct bfa_s *bfa) in bfa_fcport_is_ddport() argument
4178 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_ddport()
4185 bfa_fcport_set_qos_bw(struct bfa_s *bfa, struct bfa_qos_bw_s *qos_bw) in bfa_fcport_set_qos_bw() argument
4187 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_set_qos_bw()
4188 enum bfa_ioc_type_e ioc_type = bfa_get_type(bfa); in bfa_fcport_set_qos_bw()
4190 bfa_trc(bfa, ioc_type); in bfa_fcport_set_qos_bw()
4210 bfa_fcport_is_ratelim(struct bfa_s *bfa) in bfa_fcport_is_ratelim() argument
4212 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_ratelim()
4222 bfa_fcport_cfg_faa(struct bfa_s *bfa, u8 state) in bfa_fcport_cfg_faa() argument
4224 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_faa()
4226 bfa_trc(bfa, state); in bfa_fcport_cfg_faa()
4234 bfa_fcport_get_ratelim_speed(struct bfa_s *bfa) in bfa_fcport_get_ratelim_speed() argument
4236 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_ratelim_speed()
4238 bfa_trc(bfa, fcport->cfg.trl_def_speed); in bfa_fcport_get_ratelim_speed()
4247 struct bfa_s *bfa = dev; in bfa_fcport_beacon() local
4248 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_beacon()
4250 bfa_trc(bfa, beacon); in bfa_fcport_beacon()
4251 bfa_trc(bfa, link_e2e_beacon); in bfa_fcport_beacon()
4252 bfa_trc(bfa, fcport->beacon); in bfa_fcport_beacon()
4253 bfa_trc(bfa, fcport->link_e2e_beacon); in bfa_fcport_beacon()
4260 bfa_fcport_is_linkup(struct bfa_s *bfa) in bfa_fcport_is_linkup() argument
4262 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_linkup()
4271 bfa_fcport_is_qos_enabled(struct bfa_s *bfa) in bfa_fcport_is_qos_enabled() argument
4273 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_qos_enabled()
4279 bfa_fcport_is_trunk_enabled(struct bfa_s *bfa) in bfa_fcport_is_trunk_enabled() argument
4281 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_is_trunk_enabled()
4287 bfa_fcport_cfg_bbcr(struct bfa_s *bfa, bfa_boolean_t on_off, u8 bb_scn) in bfa_fcport_cfg_bbcr() argument
4289 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_cfg_bbcr()
4291 bfa_trc(bfa, on_off); in bfa_fcport_cfg_bbcr()
4293 if (bfa_ioc_get_type(&fcport->bfa->ioc) != BFA_IOC_TYPE_FC) in bfa_fcport_cfg_bbcr()
4296 if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type) && in bfa_fcport_cfg_bbcr()
4297 (bfa->ioc.attr->card_type != BFA_MFG_TYPE_CHINOOK)) in bfa_fcport_cfg_bbcr()
4311 (fcport->cfg.speed < bfa_ioc_speed_sup(&bfa->ioc))) in bfa_fcport_cfg_bbcr()
4314 if (bfa_ioc_speed_sup(&bfa->ioc) < BFA_PORT_SPEED_8GBPS) in bfa_fcport_cfg_bbcr()
4341 bfa_fcport_get_bbcr_attr(struct bfa_s *bfa, in bfa_fcport_get_bbcr_attr() argument
4344 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); in bfa_fcport_get_bbcr_attr()
4346 if (bfa_ioc_get_type(&fcport->bfa->ioc) != BFA_IOC_TYPE_FC) in bfa_fcport_get_bbcr_attr()
4358 bfa_fcport_dportenable(struct bfa_s *bfa) in bfa_fcport_dportenable() argument
4363 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DPORTENABLE); in bfa_fcport_dportenable()
4364 bfa_port_set_dportenabled(&bfa->modules.port, BFA_TRUE); in bfa_fcport_dportenable()
4368 bfa_fcport_dportdisable(struct bfa_s *bfa) in bfa_fcport_dportdisable() argument
4373 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DPORTDISABLE); in bfa_fcport_dportdisable()
4374 bfa_port_set_dportenabled(&bfa->modules.port, BFA_FALSE); in bfa_fcport_dportdisable()
4378 bfa_fcport_ddportenable(struct bfa_s *bfa) in bfa_fcport_ddportenable() argument
4383 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DDPORTENABLE); in bfa_fcport_ddportenable()
4387 bfa_fcport_ddportdisable(struct bfa_s *bfa) in bfa_fcport_ddportdisable() argument
4392 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DDPORTDISABLE); in bfa_fcport_ddportdisable()
4404 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_uninit()
4405 bfa_trc(rp->bfa, event); in bfa_rport_sm_uninit()
4415 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_uninit()
4422 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_created()
4423 bfa_trc(rp->bfa, event); in bfa_rport_sm_created()
4447 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_created()
4457 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_fwcreate()
4458 bfa_trc(rp->bfa, event); in bfa_rport_sm_fwcreate()
4484 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_fwcreate()
4494 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_fwcreate_qfull()
4495 bfa_trc(rp->bfa, event); in bfa_rport_sm_fwcreate_qfull()
4525 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_fwcreate_qfull()
4537 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_online()
4538 bfa_trc(rp->bfa, event); in bfa_rport_sm_online()
4569 bfa_trc(rp->bfa, qos_scn->old_qos_attr.qos_flow_id); in bfa_rport_sm_online()
4570 bfa_trc(rp->bfa, qos_scn->new_qos_attr.qos_flow_id); in bfa_rport_sm_online()
4571 bfa_trc(rp->bfa, qos_scn->old_qos_attr.qos_priority); in bfa_rport_sm_online()
4572 bfa_trc(rp->bfa, qos_scn->new_qos_attr.qos_priority); in bfa_rport_sm_online()
4593 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_online()
4603 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_fwdelete()
4604 bfa_trc(rp->bfa, event); in bfa_rport_sm_fwdelete()
4626 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_fwdelete()
4633 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_fwdelete_qfull()
4634 bfa_trc(rp->bfa, event); in bfa_rport_sm_fwdelete_qfull()
4656 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_fwdelete_qfull()
4666 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_offline()
4667 bfa_trc(rp->bfa, event); in bfa_rport_sm_offline()
4695 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_offline()
4705 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_deleting()
4706 bfa_trc(rp->bfa, event); in bfa_rport_sm_deleting()
4722 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_deleting()
4729 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_deleting_qfull()
4730 bfa_trc(rp->bfa, event); in bfa_rport_sm_deleting_qfull()
4747 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_deleting_qfull()
4758 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_delete_pending()
4759 bfa_trc(rp->bfa, event); in bfa_rport_sm_delete_pending()
4778 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_delete_pending()
4789 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_offline_pending()
4790 bfa_trc(rp->bfa, event); in bfa_rport_sm_offline_pending()
4814 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_offline_pending()
4824 bfa_trc(rp->bfa, rp->rport_tag); in bfa_rport_sm_iocdisable()
4825 bfa_trc(rp->bfa, event); in bfa_rport_sm_iocdisable()
4852 bfa_sm_fault(rp->bfa, event); in bfa_rport_sm_iocdisable()
4890 struct bfa_s *bfa) in bfa_rport_meminfo() argument
4892 struct bfa_mem_kva_s *rport_kva = BFA_MEM_RPORT_KVA(bfa); in bfa_rport_meminfo()
4903 bfa_rport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_rport_attach() argument
4906 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa); in bfa_rport_attach()
4923 rp->bfa = bfa; in bfa_rport_attach()
4943 bfa_rport_detach(struct bfa_s *bfa) in bfa_rport_detach() argument
4948 bfa_rport_start(struct bfa_s *bfa) in bfa_rport_start() argument
4953 bfa_rport_stop(struct bfa_s *bfa) in bfa_rport_stop() argument
4958 bfa_rport_iocdisable(struct bfa_s *bfa) in bfa_rport_iocdisable() argument
4960 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa); in bfa_rport_iocdisable()
4988 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(rport->bfa); in bfa_rport_free()
5003 m = bfa_reqq_next(rp->bfa, BFA_REQQ_RPORT); in bfa_rport_send_fwcreate()
5005 bfa_reqq_wait(rp->bfa, BFA_REQQ_RPORT, &rp->reqq_wait); in bfa_rport_send_fwcreate()
5010 bfa_fn_lpu(rp->bfa)); in bfa_rport_send_fwcreate()
5014 m->lp_fwtag = bfa_lps_get_fwtag(rp->bfa, (u8)rp->rport_info.lp_tag); in bfa_rport_send_fwcreate()
5024 bfa_reqq_produce(rp->bfa, BFA_REQQ_RPORT, m->mh); in bfa_rport_send_fwcreate()
5036 m = bfa_reqq_next(rp->bfa, BFA_REQQ_RPORT); in bfa_rport_send_fwdelete()
5038 bfa_reqq_wait(rp->bfa, BFA_REQQ_RPORT, &rp->reqq_wait); in bfa_rport_send_fwdelete()
5043 bfa_fn_lpu(rp->bfa)); in bfa_rport_send_fwdelete()
5049 bfa_reqq_produce(rp->bfa, BFA_REQQ_RPORT, m->mh); in bfa_rport_send_fwdelete()
5061 m = bfa_reqq_next(rp->bfa, BFA_REQQ_RPORT); in bfa_rport_send_fwspeed()
5063 bfa_trc(rp->bfa, rp->rport_info.speed); in bfa_rport_send_fwspeed()
5068 bfa_fn_lpu(rp->bfa)); in bfa_rport_send_fwspeed()
5075 bfa_reqq_produce(rp->bfa, BFA_REQQ_RPORT, m->mh); in bfa_rport_send_fwspeed()
5089 bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *m) in bfa_rport_isr() argument
5094 bfa_trc(bfa, m->mhdr.msg_id); in bfa_rport_isr()
5100 rp = BFA_RPORT_FROM_TAG(bfa, msg.create_rsp->bfa_handle); in bfa_rport_isr()
5103 bfa_rport_set_lunmask(bfa, rp); in bfa_rport_isr()
5109 rp = BFA_RPORT_FROM_TAG(bfa, msg.delete_rsp->bfa_handle); in bfa_rport_isr()
5111 bfa_rport_unset_lunmask(bfa, rp); in bfa_rport_isr()
5116 rp = BFA_RPORT_FROM_TAG(bfa, msg.qos_scn_evt->bfa_handle); in bfa_rport_isr()
5122 bfa_fcport_update_loop_info(BFA_FCPORT_MOD(bfa), in bfa_rport_isr()
5124 bfa_cb_rport_scn_online(bfa); in bfa_rport_isr()
5128 bfa_cb_rport_scn_offline(bfa); in bfa_rport_isr()
5132 rp = BFA_RPORT_FROM_TAG(bfa, msg.lip_scn->bfa_handle); in bfa_rport_isr()
5137 bfa_trc(bfa, m->mhdr.msg_id); in bfa_rport_isr()
5143 bfa_rport_res_recfg(struct bfa_s *bfa, u16 num_rport_fw) in bfa_rport_res_recfg() argument
5145 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa); in bfa_rport_res_recfg()
5160 bfa_rport_create(struct bfa_s *bfa, void *rport_drv) in bfa_rport_create() argument
5164 rp = bfa_rport_alloc(BFA_RPORT_MOD(bfa)); in bfa_rport_create()
5169 rp->bfa = bfa; in bfa_rport_create()
5189 bfa_trc(rport->bfa, rport->rport_tag); in bfa_rport_online()
5211 bfa_rport_set_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp) in bfa_rport_set_lunmask() argument
5213 struct bfa_lps_mod_s *lps_mod = BFA_LPS_MOD(bfa); in bfa_rport_set_lunmask()
5222 bfa_fcpim_lunmask_rp_update(bfa, lp_wwn, rp_wwn, rp->rport_tag, lp_tag); in bfa_rport_set_lunmask()
5227 bfa_rport_unset_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp) in bfa_rport_unset_lunmask() argument
5229 struct bfa_lps_mod_s *lps_mod = BFA_LPS_MOD(bfa); in bfa_rport_unset_lunmask()
5237 bfa_fcpim_lunmask_rp_update(bfa, lp_wwn, rp_wwn, in bfa_rport_unset_lunmask()
5250 struct bfa_s *bfa) in bfa_sgpg_meminfo() argument
5252 struct bfa_sgpg_mod_s *sgpg_mod = BFA_SGPG_MOD(bfa); in bfa_sgpg_meminfo()
5253 struct bfa_mem_kva_s *sgpg_kva = BFA_MEM_SGPG_KVA(bfa); in bfa_sgpg_meminfo()
5284 bfa_sgpg_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_sgpg_attach() argument
5287 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); in bfa_sgpg_attach()
5303 bfa_trc(bfa, cfg->drvcfg.num_sgpgs); in bfa_sgpg_attach()
5347 bfa_sgpg_detach(struct bfa_s *bfa) in bfa_sgpg_detach() argument
5352 bfa_sgpg_start(struct bfa_s *bfa) in bfa_sgpg_start() argument
5357 bfa_sgpg_stop(struct bfa_s *bfa) in bfa_sgpg_stop() argument
5362 bfa_sgpg_iocdisable(struct bfa_s *bfa) in bfa_sgpg_iocdisable() argument
5367 bfa_sgpg_malloc(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpgs) in bfa_sgpg_malloc() argument
5369 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); in bfa_sgpg_malloc()
5387 bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg) in bfa_sgpg_mfree() argument
5389 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); in bfa_sgpg_mfree()
5409 bfa_sgpg_malloc(bfa, &wqe->sgpg_q, nsgpg); in bfa_sgpg_mfree()
5419 bfa_sgpg_wait(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe, int nsgpg) in bfa_sgpg_wait() argument
5421 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); in bfa_sgpg_wait()
5445 bfa_sgpg_wcancel(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe) in bfa_sgpg_wcancel() argument
5447 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); in bfa_sgpg_wcancel()
5453 bfa_sgpg_mfree(bfa, &wqe->sgpg_q, in bfa_sgpg_wcancel()
5478 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(uf->bfa); in __bfa_cb_uf_recv()
5502 bfa_fn_lpu(ufm->bfa)); in claim_uf_post_msgs()
5528 uf->bfa = ufm->bfa; in claim_ufs()
5551 struct bfa_s *bfa) in bfa_uf_meminfo() argument
5553 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); in bfa_uf_meminfo()
5554 struct bfa_mem_kva_s *uf_kva = BFA_MEM_UF_KVA(bfa); in bfa_uf_meminfo()
5578 bfa_uf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_uf_attach() argument
5581 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); in bfa_uf_attach()
5583 ufm->bfa = bfa; in bfa_uf_attach()
5593 bfa_uf_detach(struct bfa_s *bfa) in bfa_uf_detach() argument
5617 uf_post_msg = bfa_reqq_next(ufm->bfa, BFA_REQQ_FCXP); in bfa_uf_post()
5623 bfa_reqq_produce(ufm->bfa, BFA_REQQ_FCXP, uf_post_msg->mh); in bfa_uf_post()
5625 bfa_trc(ufm->bfa, uf->uf_tag); in bfa_uf_post()
5643 uf_recv(struct bfa_s *bfa, struct bfi_uf_frm_rcvd_s *m) in uf_recv() argument
5645 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); in uf_recv()
5669 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_UF, BFA_PL_EID_RX, in uf_recv()
5673 bfa_plog_fchdr_and_pl(bfa->plog, BFA_PL_MID_HAL_UF, in uf_recv()
5678 if (bfa->fcs) in uf_recv()
5681 bfa_cb_queue(bfa, &uf->hcb_qe, __bfa_cb_uf_recv, uf); in uf_recv()
5685 bfa_uf_stop(struct bfa_s *bfa) in bfa_uf_stop() argument
5690 bfa_uf_iocdisable(struct bfa_s *bfa) in bfa_uf_iocdisable() argument
5692 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); in bfa_uf_iocdisable()
5707 bfa_uf_start(struct bfa_s *bfa) in bfa_uf_start() argument
5709 bfa_uf_post_all(BFA_UF_MOD(bfa)); in bfa_uf_start()
5720 bfa_uf_recv_register(struct bfa_s *bfa, bfa_cb_uf_recv_t ufrecv, void *cbarg) in bfa_uf_recv_register() argument
5722 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa); in bfa_uf_recv_register()
5738 bfa_uf_put(BFA_UF_MOD(uf->bfa), uf); in bfa_uf_free()
5739 bfa_uf_post_all(BFA_UF_MOD(uf->bfa)); in bfa_uf_free()
5748 bfa_uf_isr(struct bfa_s *bfa, struct bfi_msg_s *msg) in bfa_uf_isr() argument
5750 bfa_trc(bfa, msg->mhdr.msg_id); in bfa_uf_isr()
5754 uf_recv(bfa, (struct bfi_uf_frm_rcvd_s *) msg); in bfa_uf_isr()
5758 bfa_trc(bfa, msg->mhdr.msg_id); in bfa_uf_isr()
5764 bfa_uf_res_recfg(struct bfa_s *bfa, u16 num_uf_fw) in bfa_uf_res_recfg() argument
5766 struct bfa_uf_mod_s *mod = BFA_UF_MOD(bfa); in bfa_uf_res_recfg()
5839 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fcdiag->bfa); in bfa_fcdiag_set_busy_status()
5849 struct bfa_s *bfa) in bfa_fcdiag_meminfo() argument
5854 bfa_fcdiag_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, in bfa_fcdiag_attach() argument
5857 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_attach()
5860 fcdiag->bfa = bfa; in bfa_fcdiag_attach()
5861 fcdiag->trcmod = bfa->trcmod; in bfa_fcdiag_attach()
5863 dport->bfa = bfa; in bfa_fcdiag_attach()
5873 bfa_fcdiag_iocdisable(struct bfa_s *bfa) in bfa_fcdiag_iocdisable() argument
5875 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_iocdisable()
5890 bfa_fcdiag_detach(struct bfa_s *bfa) in bfa_fcdiag_detach() argument
5895 bfa_fcdiag_start(struct bfa_s *bfa) in bfa_fcdiag_start() argument
5900 bfa_fcdiag_stop(struct bfa_s *bfa) in bfa_fcdiag_stop() argument
5932 req = bfa_reqq_next(fcdiag->bfa, fcdiag->qtest.queue); in bfa_fcdiag_queuetest_send()
5938 bfa_fn_lpu(fcdiag->bfa)); in bfa_fcdiag_queuetest_send()
5945 bfa_reqq_produce(fcdiag->bfa, fcdiag->qtest.queue, req->mh); in bfa_fcdiag_queuetest_send()
6032 lb_req = bfa_reqq_next(fcdiag->bfa, BFA_REQQ_DIAG); in bfa_fcdiag_loopback_send()
6038 bfa_fn_lpu(fcdiag->bfa)); in bfa_fcdiag_loopback_send()
6046 bfa_reqq_produce(fcdiag->bfa, BFA_REQQ_DIAG, lb_req->mh); in bfa_fcdiag_loopback_send()
6059 bfa_fcdiag_intr(struct bfa_s *bfa, struct bfi_msg_s *msg) in bfa_fcdiag_intr() argument
6061 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_intr()
6100 bfa_fcdiag_loopback(struct bfa_s *bfa, enum bfa_port_opmode opmode, in bfa_fcdiag_loopback() argument
6108 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_loopback()
6110 if (!bfa_iocfc_is_operational(bfa)) in bfa_fcdiag_loopback()
6114 if (bfa_fcport_is_pbcdisabled(bfa)) { in bfa_fcdiag_loopback()
6119 if (bfa_fcport_is_disabled(bfa) == BFA_FALSE) { in bfa_fcdiag_loopback()
6127 if (bfa_ioc_get_type(&bfa->ioc) == BFA_IOC_TYPE_FC) { in bfa_fcdiag_loopback()
6137 bfa_fcport_get_attr(bfa, &attr); in bfa_fcdiag_loopback()
6152 (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id))) { in bfa_fcdiag_loopback()
6158 if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type)) { in bfa_fcdiag_loopback()
6159 if (bfa_ioc_get_type(&bfa->ioc) == BFA_IOC_TYPE_FC) { in bfa_fcdiag_loopback()
6173 if (bfa_fcport_is_dport(bfa)) { in bfa_fcdiag_loopback()
6212 bfa_fcdiag_queuetest(struct bfa_s *bfa, u32 force, u32 queue, in bfa_fcdiag_queuetest() argument
6216 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_queuetest()
6221 if (!force && !bfa_iocfc_is_operational(bfa)) in bfa_fcdiag_queuetest()
6255 bfa_timer_start(bfa, &fcdiag->qtest.timer, in bfa_fcdiag_queuetest()
6271 bfa_fcdiag_lb_is_running(struct bfa_s *bfa) in bfa_fcdiag_lb_is_running() argument
6273 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_fcdiag_lb_is_running()
6304 bfa_trc(dport->bfa, event); in bfa_dport_sm_disabled()
6308 bfa_fcport_dportenable(dport->bfa); in bfa_dport_sm_disabled()
6325 bfa_fcport_ddportenable(dport->bfa); in bfa_dport_sm_disabled()
6330 bfa_trc(dport->bfa, dport->i2hmsg.scn.state); in bfa_dport_sm_disabled()
6336 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_disabled()
6344 bfa_trc(dport->bfa, event); in bfa_dport_sm_enabling_qwait()
6359 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabling_qwait()
6366 bfa_trc(dport->bfa, event); in bfa_dport_sm_enabling()
6383 bfa_fcport_dportdisable(dport->bfa); in bfa_dport_sm_enabling()
6393 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabling()
6400 bfa_trc(dport->bfa, event); in bfa_dport_sm_enabled()
6411 bfa_fcport_dportdisable(dport->bfa); in bfa_dport_sm_enabled()
6442 bfa_fcport_ddportdisable(dport->bfa); in bfa_dport_sm_enabled()
6453 bfa_fcport_ddportdisable(dport->bfa); in bfa_dport_sm_enabled()
6460 bfa_trc(dport->bfa, dport->i2hmsg.scn.state); in bfa_dport_sm_enabled()
6461 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabled()
6465 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_enabled()
6473 bfa_trc(dport->bfa, event); in bfa_dport_sm_disabling_qwait()
6492 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_disabling_qwait()
6499 bfa_trc(dport->bfa, event); in bfa_dport_sm_disabling()
6517 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_disabling()
6525 bfa_trc(dport->bfa, event); in bfa_dport_sm_starting_qwait()
6540 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_starting_qwait()
6547 bfa_trc(dport->bfa, event); in bfa_dport_sm_starting()
6571 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_starting()
6579 bfa_trc(dport->bfa, event); in bfa_dport_sm_dynamic_disabling()
6587 bfa_fcport_enable(dport->bfa); in bfa_dport_sm_dynamic_disabling()
6591 bfa_trc(dport->bfa, dport->i2hmsg.scn.state); in bfa_dport_sm_dynamic_disabling()
6592 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_dynamic_disabling()
6603 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_dynamic_disabling()
6611 bfa_trc(dport->bfa, event); in bfa_dport_sm_dynamic_disabling_qwait()
6630 bfa_sm_fault(dport->bfa, event); in bfa_dport_sm_dynamic_disabling_qwait()
6642 m = bfa_reqq_next(dport->bfa, BFA_REQQ_DIAG); in bfa_dport_send_req()
6644 bfa_reqq_wait(dport->bfa, BFA_REQQ_PORT, &dport->reqq_wait); in bfa_dport_send_req()
6649 bfa_fn_lpu(dport->bfa)); in bfa_dport_send_req()
6659 bfa_reqq_produce(dport->bfa, BFA_REQQ_DIAG, m->mh); in bfa_dport_send_req()
6682 bfa_trc(dport->bfa, msg->status); in bfa_dport_req_comp()
6683 bfa_trc(dport->bfa, dport->rp_pwwn); in bfa_dport_req_comp()
6684 bfa_trc(dport->bfa, dport->rp_nwwn); in bfa_dport_req_comp()
6688 bfa_trc(dport->bfa, msg->status); in bfa_dport_req_comp()
6715 bfa_trc(dport->bfa, msg->state); in bfa_dport_scn()
6721 bfa_trc(dport->bfa, dport->result.end_time); in bfa_dport_scn()
6724 bfa_trc(dport->bfa, dport->result.status); in bfa_dport_scn()
6736 bfa_trc(dport->bfa, dport->result.roundtrip_latency); in bfa_dport_scn()
6737 bfa_trc(dport->bfa, dport->result.est_cable_distance); in bfa_dport_scn()
6738 bfa_trc(dport->bfa, dport->result.buffer_required); in bfa_dport_scn()
6739 bfa_trc(dport->bfa, dport->result.frmsz); in bfa_dport_scn()
6740 bfa_trc(dport->bfa, dport->result.speed); in bfa_dport_scn()
6745 bfa_trc(dport->bfa, dport->result.subtest[i].status); in bfa_dport_scn()
6771 bfa_trc(dport->bfa, subtesttype); in bfa_dport_scn()
6772 bfa_trc(dport->bfa, in bfa_dport_scn()
6784 bfa_sm_fault(dport->bfa, msg->state); in bfa_dport_scn()
6796 bfa_dport_enable(struct bfa_s *bfa, u32 lpcnt, u32 pat, in bfa_dport_enable() argument
6799 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_enable()
6805 if (bfa_mfg_is_mezz(dport->bfa->ioc.attr->card_type)) { in bfa_dport_enable()
6806 bfa_trc(dport->bfa, BFA_STATUS_PBC); in bfa_dport_enable()
6813 if (!(bfa_asic_id_ct2(dport->bfa->ioc.pcidev.device_id))) { in bfa_dport_enable()
6814 bfa_trc(dport->bfa, dport->bfa->ioc.pcidev.device_id); in bfa_dport_enable()
6821 if (!bfa_iocfc_is_operational(bfa)) in bfa_dport_enable()
6825 if (bfa_fcport_is_pbcdisabled(bfa)) { in bfa_dport_enable()
6826 bfa_trc(dport->bfa, BFA_STATUS_PBC); in bfa_dport_enable()
6833 if (bfa_ioc_get_type(&bfa->ioc) != BFA_IOC_TYPE_FC) { in bfa_dport_enable()
6834 bfa_trc(dport->bfa, bfa_ioc_get_type(&bfa->ioc)); in bfa_dport_enable()
6841 if ((bfa_fcport_get_cfg_topology(bfa) == BFA_PORT_TOPOLOGY_LOOP) || in bfa_dport_enable()
6842 (bfa_fcport_get_topology(bfa) == BFA_PORT_TOPOLOGY_LOOP)) { in bfa_dport_enable()
6843 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6850 if (bfa_fcport_is_trunk_enabled(bfa)) { in bfa_dport_enable()
6851 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6858 if (bfa_fcdiag_lb_is_running(bfa)) { in bfa_dport_enable()
6859 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6866 if ((bfa_fcport_is_disabled(bfa) == BFA_FALSE) && in bfa_dport_enable()
6867 (bfa_fcport_is_dport(bfa) == BFA_FALSE)) { in bfa_dport_enable()
6868 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6888 bfa_trc(dport->bfa, 0); in bfa_dport_enable()
6892 bfa_trc(dport->bfa, lpcnt); in bfa_dport_enable()
6893 bfa_trc(dport->bfa, pat); in bfa_dport_enable()
6909 bfa_dport_disable(struct bfa_s *bfa, bfa_cb_diag_t cbfn, void *cbarg) in bfa_dport_disable() argument
6911 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_disable()
6914 if (bfa_ioc_is_disabled(&bfa->ioc)) in bfa_dport_disable()
6918 if (bfa_fcport_is_pbcdisabled(bfa)) { in bfa_dport_disable()
6919 bfa_trc(dport->bfa, BFA_STATUS_PBC); in bfa_dport_disable()
6933 if ((bfa_fcport_is_disabled(bfa) == BFA_FALSE) && in bfa_dport_disable()
6934 (bfa_fcport_is_dport(bfa) == BFA_FALSE)) { in bfa_dport_disable()
6935 bfa_trc(dport->bfa, 0); in bfa_dport_disable()
6949 bfa_trc(dport->bfa, 0); in bfa_dport_disable()
6966 bfa_dport_start(struct bfa_s *bfa, u32 lpcnt, u32 pat, in bfa_dport_start() argument
6969 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_start()
6975 if (!bfa_iocfc_is_operational(bfa)) in bfa_dport_start()
6995 bfa_trc(dport->bfa, 0); in bfa_dport_start()
7008 bfa_trc(dport->bfa, lpcnt); in bfa_dport_start()
7009 bfa_trc(dport->bfa, pat); in bfa_dport_start()
7027 bfa_dport_show(struct bfa_s *bfa, struct bfa_diag_dport_result_s *result) in bfa_dport_show() argument
7029 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa); in bfa_dport_show()
7035 if (!bfa_iocfc_is_operational(bfa)) in bfa_dport_show()
7048 bfa_trc(dport->bfa, 0); in bfa_dport_show()