Lines Matching defs:bfa

39 #define BFA_PORT_IS_DISABLED(bfa) \
40 ((bfa_fcport_is_disabled(bfa) == BFA_TRUE) || \
41 (bfa_ioc_is_disabled(&bfa->ioc) == BFA_TRUE))
47 if ((__rp)->bfa->fcs) \
50 bfa_cb_queue((__rp)->bfa, &(__rp)->hcb_qe, \
56 if ((__rp)->bfa->fcs) \
59 bfa_cb_queue((__rp)->bfa, &(__rp)->hcb_qe, \
68 static void hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp,
70 static void hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen,
79 static void bfa_lps_login_rsp(struct bfa_s *bfa,
82 static void bfa_lps_logout_rsp(struct bfa_s *bfa,
123 static void bfa_trunk_iocdisable(struct bfa_s *bfa);
433 struct bfa_s *bfa)
435 struct bfa_fcxp_mod_s *fcxp_mod = BFA_FCXP_MOD(bfa);
436 struct bfa_mem_kva_s *fcxp_kva = BFA_MEM_FCXP_KVA(bfa);
470 bfa_fcxp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
473 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
475 mod->bfa = bfa;
492 bfa_fcxp_iocdisable(struct bfa_s *bfa)
494 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
510 bfa_cb_queue(bfa, &fcxp->hcb_qe,
534 struct bfa_s *bfa,
545 WARN_ON(bfa == NULL);
547 bfa_trc(bfa, fcxp->fcxp_tag);
572 void *caller, struct bfa_s *bfa, int nreq_sgles,
579 WARN_ON(bfa == NULL);
581 bfa_trc(bfa, fcxp->fcxp_tag);
585 bfa_fcxp_init_reqrsp(fcxp, bfa,
590 bfa_fcxp_init_reqrsp(fcxp, bfa,
609 bfa_trc(mod->bfa, fcxp->fcxp_tag);
611 bfa_fcxp_init(fcxp, wqe->caller, wqe->bfa, wqe->nreq_sgles,
652 hal_fcxp_send_comp(struct bfa_s *bfa, struct bfi_fcxp_send_rsp_s *fcxp_rsp)
654 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
658 bfa_trc(bfa, fcxp_tag);
675 hal_fcxp_rx_plog(mod->bfa, fcxp, fcxp_rsp);
678 bfa_trc(mod->bfa, (NULL == fcxp->caller));
693 bfa_cb_queue(bfa, &fcxp->hcb_qe,
697 bfa_trc(bfa, (NULL == fcxp->send_cbfn));
702 hal_fcxp_tx_plog(struct bfa_s *bfa, u32 reqlen, struct bfa_fcxp_s *fcxp,
713 bfa_plog_fchdr_and_pl(bfa->plog, BFA_PL_MID_HAL_FCXP,
718 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP,
724 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP, BFA_PL_EID_TX,
730 hal_fcxp_rx_plog(struct bfa_s *bfa, struct bfa_fcxp_s *fcxp,
738 bfa_plog_fchdr_and_pl(bfa->plog, BFA_PL_MID_HAL_FCXP,
743 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP,
749 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_FCXP, BFA_PL_EID_RX,
761 struct bfa_s *bfa = fcxp->fcxp_mod->bfa;
765 send_req = bfa_reqq_next(bfa, BFA_REQQ_FCXP);
775 struct bfa_s *bfa = fcxp->fcxp_mod->bfa;
781 bfa_fn_lpu(bfa));
795 send_req->lp_fwtag = bfa_lps_get_fwtag(bfa, reqi->lp_tag);
841 hal_fcxp_tx_plog(bfa, reqi->req_tot_len, fcxp, &reqi->fchs);
843 bfa_reqq_produce(bfa, BFA_REQQ_FCXP, send_req->mh);
845 bfa_trc(bfa, bfa_reqq_pi(bfa, BFA_REQQ_FCXP));
846 bfa_trc(bfa, bfa_reqq_ci(bfa, BFA_REQQ_FCXP));
853 * @param[in] bfa BFA bfa instance
875 bfa_fcxp_req_rsp_alloc(void *caller, struct bfa_s *bfa, int nreq_sgles,
883 WARN_ON(bfa == NULL);
885 fcxp = bfa_fcxp_get(BFA_FCXP_MOD(bfa), req);
889 bfa_trc(bfa, fcxp->fcxp_tag);
891 bfa_fcxp_init(fcxp, caller, bfa, nreq_sgles, nrsp_sgles, req_sga_cbfn,
951 bfa_trc(mod->bfa, fcxp->fcxp_tag);
982 struct bfa_s *bfa = fcxp->fcxp_mod->bfa;
987 bfa_trc(bfa, fcxp->fcxp_tag);
1007 send_req = bfa_reqq_next(bfa, BFA_REQQ_FCXP);
1009 bfa_trc(bfa, fcxp->fcxp_tag);
1011 bfa_reqq_wait(bfa, BFA_REQQ_FCXP, &fcxp->reqq_wqe);
1019 bfa_fcxp_req_rsp_alloc_wait(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe,
1027 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
1037 wqe->bfa = bfa;
1052 bfa_fcxp_walloc_cancel(struct bfa_s *bfa, struct bfa_fcxp_wqe_s *wqe)
1054 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
1079 bfa_fcxp_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
1083 hal_fcxp_send_comp(bfa, (struct bfi_fcxp_send_rsp_s *) msg);
1087 bfa_trc(bfa, msg->mhdr.msg_id);
1093 bfa_fcxp_get_maxrsp(struct bfa_s *bfa)
1095 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
1101 bfa_fcxp_res_recfg(struct bfa_s *bfa, u16 num_fcxp_fw)
1103 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa);
1128 bfa_trc(lps->bfa, lps->bfa_tag);
1129 bfa_trc(lps->bfa, event);
1133 if (bfa_reqq_full(lps->bfa, lps->reqq)) {
1135 bfa_reqq_wait(lps->bfa, lps->reqq, &lps->wqe);
1142 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1145 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1176 bfa_sm_fault(lps->bfa, event);
1186 bfa_trc(lps->bfa, lps->bfa_tag);
1187 bfa_trc(lps->bfa, event);
1194 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1197 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1200 bfa_trc(lps->bfa, lps->fport);
1201 bfa_trc(lps->bfa, lps->lp_pid);
1208 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1212 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1225 bfa_trc(lps->bfa, lps->fport);
1226 bfa_trc(lps->bfa, lps->lp_pid);
1230 bfa_sm_fault(lps->bfa, event);
1240 bfa_trc(lps->bfa, lps->bfa_tag);
1241 bfa_trc(lps->bfa, event);
1264 bfa_sm_fault(lps->bfa, event);
1274 bfa_trc(lps->bfa, lps->bfa_tag);
1275 bfa_trc(lps->bfa, event);
1279 if (bfa_reqq_full(lps->bfa, lps->reqq)) {
1281 bfa_reqq_wait(lps->bfa, lps->reqq, &lps->wqe);
1286 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1295 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1300 if (bfa_reqq_full(lps->bfa, lps->reqq)) {
1302 bfa_reqq_wait(lps->bfa, lps->reqq, &lps->wqe);
1313 bfa_sm_fault(lps->bfa, event);
1323 bfa_trc(lps->bfa, lps->bfa_tag);
1324 bfa_trc(lps->bfa, event);
1334 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1344 bfa_plog_str(lps->bfa->plog, BFA_PL_MID_LPS,
1355 bfa_sm_fault(lps->bfa, event);
1365 bfa_trc(lps->bfa, lps->bfa_tag);
1366 bfa_trc(lps->bfa, event);
1380 bfa_sm_fault(lps->bfa, event);
1390 bfa_trc(lps->bfa, lps->bfa_tag);
1391 bfa_trc(lps->bfa, event);
1406 bfa_sm_fault(lps->bfa, event);
1421 struct bfa_s *bfa)
1423 struct bfa_mem_kva_s *lps_kva = BFA_MEM_LPS_KVA(bfa);
1434 * bfa module attach at initialization time
1437 bfa_lps_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
1440 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1458 lps->bfa = bfa;
1470 bfa_lps_iocdisable(struct bfa_s *bfa)
1472 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1491 bfa_lps_login_rsp(struct bfa_s *bfa, struct bfi_lps_login_rsp_s *rsp)
1493 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1546 struct bfa_s *bfa = first_lps->bfa;
1547 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1551 bfa_trc(bfa, count);
1558 bfa_trc(bfa, lps->bfa_tag);
1572 bfa_lps_logout_rsp(struct bfa_s *bfa, struct bfi_lps_logout_rsp_s *rsp)
1574 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1587 bfa_lps_rx_cvl_event(struct bfa_s *bfa, struct bfi_lps_cvl_event_s *cvl)
1589 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1614 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa);
1627 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa);
1630 m = bfa_reqq_next(lps->bfa, lps->reqq);
1634 bfa_fn_lpu(lps->bfa));
1644 bfa_reqq_produce(lps->bfa, lps->reqq, m->mh);
1657 m = bfa_reqq_next(lps->bfa, lps->reqq);
1661 bfa_fn_lpu(lps->bfa));
1665 bfa_reqq_produce(lps->bfa, lps->reqq, m->mh);
1676 m = bfa_reqq_next(lps->bfa, lps->reqq);
1680 bfa_fn_lpu(lps->bfa));
1684 bfa_reqq_produce(lps->bfa, lps->reqq, m->mh);
1699 bfa_cb_lps_fdisc_comp(lps->bfa->bfad, lps->uarg, lps->status);
1701 bfa_cb_lps_flogi_comp(lps->bfa->bfad, lps->uarg, lps->status);
1710 if (!lps->bfa->fcs) {
1711 bfa_cb_queue(lps->bfa, &lps->hcb_qe, bfa_lps_login_comp_cb,
1717 bfa_cb_lps_fdisc_comp(lps->bfa->bfad, lps->uarg, lps->status);
1719 bfa_cb_lps_flogi_comp(lps->bfa->bfad, lps->uarg, lps->status);
1734 bfa_cb_lps_fdisclogo_comp(lps->bfa->bfad, lps->uarg);
1736 bfa_cb_lps_flogo_comp(lps->bfa->bfad, lps->uarg);
1745 if (!lps->bfa->fcs) {
1746 bfa_cb_queue(lps->bfa, &lps->hcb_qe, bfa_lps_logout_comp_cb,
1751 bfa_cb_lps_fdisclogo_comp(lps->bfa->bfad, lps->uarg);
1767 bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg);
1777 if (!lps->bfa->fcs) {
1778 bfa_cb_queue(lps->bfa, &lps->hcb_qe, bfa_lps_cvl_event_cb,
1785 bfa_cb_lps_cvl_event(lps->bfa->bfad, lps->uarg);
1795 bfa_lps_get_max_vport(struct bfa_s *bfa)
1797 if (bfa_ioc_devid(&bfa->ioc) == BFA_PCI_DEVICE_ID_CT)
1807 bfa_lps_alloc(struct bfa_s *bfa)
1809 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1878 bfa_lps_get_fwtag(struct bfa_s *bfa, u8 lp_tag)
1880 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1889 bfa_lps_get_tag_from_pid(struct bfa_s *bfa, u32 pid)
1891 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1909 bfa_lps_get_base_pid(struct bfa_s *bfa)
1911 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa);
1922 bfa_trc(lps->bfa, lps->bfa_tag);
1923 bfa_trc(lps->bfa, n2n_pid);
1933 bfa_lps_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
1937 bfa_trc(bfa, m->mhdr.msg_id);
1942 bfa_lps_login_rsp(bfa, msg.login_rsp);
1946 bfa_lps_logout_rsp(bfa, msg.logout_rsp);
1950 bfa_lps_rx_cvl_event(bfa, msg.cvl_event);
1954 bfa_trc(bfa, m->mhdr.msg_id);
1962 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
1969 aen_entry->aen_data.port.ioc_type = bfa_get_type(fcport->bfa);
1973 bfad_im_post_vendor_event(aen_entry, bfad, ++fcport->bfa->bfa_aen_seq,
1984 bfa_trc(fcport->bfa, event);
1994 bfa_trc(fcport->bfa, BFA_TRUE);
1997 bfa_trc(fcport->bfa, BFA_FALSE);
2024 bfa_sm_fault(fcport->bfa, event);
2033 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
2034 bfa_trc(fcport->bfa, event);
2060 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2088 bfa_sm_fault(fcport->bfa, event);
2097 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
2098 bfa_trc(fcport->bfa, event);
2127 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2150 bfa_sm_fault(fcport->bfa, event);
2160 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
2162 bfa_trc(fcport->bfa, event);
2169 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2171 if (!bfa_ioc_get_fcmode(&fcport->bfa->ioc)) {
2173 bfa_trc(fcport->bfa,
2175 bfa_trc(fcport->bfa,
2179 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2183 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2219 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2242 bfa_sm_fault(fcport->bfa, event);
2251 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
2253 bfa_trc(fcport->bfa, event);
2271 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2286 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2289 if (BFA_PORT_IS_DISABLED(fcport->bfa)) {
2305 if (BFA_PORT_IS_DISABLED(fcport->bfa)) {
2322 if (BFA_PORT_IS_DISABLED(fcport->bfa)) {
2341 bfa_sm_fault(fcport->bfa, event);
2349 bfa_trc(fcport->bfa, event);
2392 bfa_sm_fault(fcport->bfa, event);
2400 bfa_trc(fcport->bfa, event);
2439 bfa_sm_fault(fcport->bfa, event);
2448 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
2449 bfa_trc(fcport->bfa, event);
2469 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2494 bfa_sm_fault(fcport->bfa, event);
2503 struct bfad_s *bfad = (struct bfad_s *)fcport->bfa->bfad;
2504 bfa_trc(fcport->bfa, event);
2524 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2551 bfa_sm_fault(fcport->bfa, event);
2559 bfa_trc(fcport->bfa, event);
2585 bfa_trc(fcport->bfa, event);
2611 bfa_trc(fcport->bfa, event);
2633 bfa_trc(fcport->bfa, event);
2658 bfa_sm_fault(fcport->bfa, event);
2666 bfa_trc(fcport->bfa, event);
2692 bfa_sm_fault(fcport->bfa, event);
2700 bfa_trc(fcport->bfa, event);
2719 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
2735 bfa_sm_fault(fcport->bfa, event);
2746 bfa_trc(ln->fcport->bfa, event);
2755 bfa_sm_fault(ln->fcport->bfa, event);
2766 bfa_trc(ln->fcport->bfa, event);
2778 bfa_sm_fault(ln->fcport->bfa, event);
2789 bfa_trc(ln->fcport->bfa, event);
2802 bfa_sm_fault(ln->fcport->bfa, event);
2813 bfa_trc(ln->fcport->bfa, event);
2822 bfa_sm_fault(ln->fcport->bfa, event);
2833 bfa_trc(ln->fcport->bfa, event);
2845 bfa_sm_fault(ln->fcport->bfa, event);
2856 bfa_trc(ln->fcport->bfa, event);
2869 bfa_sm_fault(ln->fcport->bfa, event);
2880 bfa_trc(ln->fcport->bfa, event);
2893 bfa_sm_fault(ln->fcport->bfa, event);
2936 if (fcport->bfa->fcs) {
2941 bfa_cb_queue(fcport->bfa, &ln->ln_qe,
2951 struct bfa_s *bfa)
2953 struct bfa_mem_dma_s *fcport_dma = BFA_MEM_FCPORT_DMA(bfa);
2981 bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
2984 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
2988 fcport->bfa = bfa;
3024 bfa_fcport_start(struct bfa_s *bfa)
3026 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_START);
3033 bfa_fcport_iocdisable(struct bfa_s *bfa)
3035 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3038 bfa_trunk_iocdisable(bfa);
3090 bfa_trc(fcport->bfa, fcport->speed);
3091 bfa_trc(fcport->bfa, fcport->topology);
3119 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
3121 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
3127 bfa_fn_lpu(fcport->bfa));
3135 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_lo);
3136 bfa_trc(fcport->bfa, m->stats_dma_addr.a32.addr_hi);
3141 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, m->mh);
3162 m = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
3164 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
3170 bfa_fn_lpu(fcport->bfa));
3176 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, m->mh);
3184 fcport->pwwn = fcport->bfa->ioc.attr->pwwn;
3185 fcport->nwwn = fcport->bfa->ioc.attr->nwwn;
3187 bfa_trc(fcport->bfa, fcport->pwwn);
3188 bfa_trc(fcport->bfa, fcport->nwwn);
3241 if (bfa_ioc_get_fcmode(&fcport->bfa->ioc))
3251 bfa_cb_queue_status(fcport->bfa, &cb->hcb_qe,
3266 bfa_trc(fcport->bfa, fcport->stats_qfull);
3283 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
3289 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
3297 bfa_fn_lpu(fcport->bfa));
3298 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, msg->mh);
3316 bfa_cb_queue_status(fcport->bfa, &cb->hcb_qe,
3331 bfa_trc(fcport->bfa, fcport->stats_qfull);
3348 msg = bfa_reqq_next(fcport->bfa, BFA_REQQ_PORT);
3354 bfa_reqq_wait(fcport->bfa, BFA_REQQ_PORT,
3362 bfa_fn_lpu(fcport->bfa));
3363 bfa_reqq_produce(fcport->bfa, BFA_REQQ_PORT, msg->mh);
3379 bfa_trc(fcport->bfa, fcport->cfg.trunked);
3383 bfa_trc(fcport->bfa, trunk->attr.state);
3384 bfa_trc(fcport->bfa, scn->trunk_state);
3385 bfa_trc(fcport->bfa, scn->trunk_speed);
3410 bfa_trc(fcport->bfa, lattr->link_state);
3411 bfa_trc(fcport->bfa, lattr->trunk_wwn);
3412 bfa_trc(fcport->bfa, lattr->fctl);
3413 bfa_trc(fcport->bfa, lattr->speed);
3414 bfa_trc(fcport->bfa, lattr->deskew);
3419 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
3423 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
3427 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
3431 bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
3446 bfa_trunk_iocdisable(struct bfa_s *bfa)
3448 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3477 bfa_fcport_init(struct bfa_s *bfa)
3479 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3486 fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc);
3487 fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc);
3488 fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc);
3490 if (bfa_fcport_is_pbcdisabled(bfa))
3491 bfa->modules.port.pbc_disabled = BFA_TRUE;
3502 bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
3504 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3510 bfa_trc(bfa, msg->mhdr.msg_id);
3511 bfa_trc(bfa, bfa_fcport_sm_to_state(hal_port_sm_table, fcport->sm));
3629 bfa_fcport_event_register(struct bfa_s *bfa,
3634 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3641 bfa_fcport_enable(struct bfa_s *bfa)
3643 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3645 if (bfa_fcport_is_pbcdisabled(bfa))
3648 if (bfa_ioc_is_disabled(&bfa->ioc))
3654 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_ENABLE);
3659 bfa_fcport_disable(struct bfa_s *bfa)
3661 if (bfa_fcport_is_pbcdisabled(bfa))
3664 if (bfa_ioc_is_disabled(&bfa->ioc))
3667 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DISABLE);
3673 bfa_fcport_is_pbcdisabled(struct bfa_s *bfa)
3675 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3676 struct bfa_iocfc_s *iocfc = &bfa->iocfc;
3680 bfa_trc(bfa, fcport->pwwn);
3690 bfa_fcport_cfg_speed(struct bfa_s *bfa, enum bfa_port_speed speed)
3692 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3694 bfa_trc(bfa, speed);
3702 bfa_trc(bfa, fcport->speed_sup);
3707 if (bfa_ioc_get_type(&fcport->bfa->ioc) == BFA_IOC_TYPE_FC) {
3710 (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id)))
3735 bfa_fcport_get_speed(struct bfa_s *bfa)
3737 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3746 bfa_fcport_cfg_topology(struct bfa_s *bfa, enum bfa_port_topology topology)
3748 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3750 bfa_trc(bfa, topology);
3751 bfa_trc(bfa, fcport->cfg.topology);
3758 if ((bfa_fcport_is_qos_enabled(bfa) != BFA_FALSE) ||
3763 if ((bfa_fcport_is_trunk_enabled(bfa) != BFA_FALSE) ||
3766 if ((bfa_fcport_get_speed(bfa) == BFA_PORT_SPEED_16GBPS) ||
3769 if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type))
3771 if (bfa_fcport_is_dport(bfa) != BFA_FALSE)
3773 if (bfa_fcport_is_ddport(bfa) != BFA_FALSE)
3792 bfa_fcport_get_topology(struct bfa_s *bfa)
3794 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3803 bfa_fcport_get_cfg_topology(struct bfa_s *bfa)
3805 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3811 bfa_fcport_cfg_hardalpa(struct bfa_s *bfa, u8 alpa)
3813 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3815 bfa_trc(bfa, alpa);
3816 bfa_trc(bfa, fcport->cfg.cfg_hardalpa);
3817 bfa_trc(bfa, fcport->cfg.hardalpa);
3826 bfa_fcport_clr_hardalpa(struct bfa_s *bfa)
3828 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3830 bfa_trc(bfa, fcport->cfg.cfg_hardalpa);
3831 bfa_trc(bfa, fcport->cfg.hardalpa);
3838 bfa_fcport_get_myalpa(struct bfa_s *bfa)
3840 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3846 bfa_fcport_cfg_maxfrsize(struct bfa_s *bfa, u16 maxfrsize)
3848 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3850 bfa_trc(bfa, maxfrsize);
3851 bfa_trc(bfa, fcport->cfg.maxfrsize);
3866 bfa_fcport_get_maxfrsize(struct bfa_s *bfa)
3868 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3874 bfa_fcport_get_rx_bbcredit(struct bfa_s *bfa)
3876 if (bfa_fcport_get_topology(bfa) != BFA_PORT_TOPOLOGY_LOOP)
3877 return (BFA_FCPORT_MOD(bfa))->cfg.rx_bbcredit;
3884 bfa_fcport_set_tx_bbcredit(struct bfa_s *bfa, u16 tx_bbcredit)
3886 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3895 bfa_fcport_get_attr(struct bfa_s *bfa, struct bfa_port_attr_s *attr)
3897 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3904 attr->factorypwwn = bfa->ioc.attr->mfg_pwwn;
3905 attr->factorynwwn = bfa->ioc.attr->mfg_nwwn;
3924 attr->pport_cfg.path_tov = bfa_fcpim_path_tov_get(bfa);
3925 attr->pport_cfg.q_depth = bfa_fcpim_qdepth_get(bfa);
3931 if (bfa_fcport_is_pbcdisabled(bfa))
3934 if (bfa_ioc_is_disabled(&fcport->bfa->ioc))
3936 else if (bfa_ioc_fw_mismatch(&fcport->bfa->ioc))
3950 bfa_fcport_get_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb)
3952 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3954 if (!bfa_iocfc_is_operational(bfa) ||
3964 bfa_timer_start(bfa, &fcport->timer,
3977 bfa_fcport_clear_stats(struct bfa_s *bfa, struct bfa_cb_pending_q_s *cb)
3979 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
3981 if (!bfa_iocfc_is_operational(bfa) ||
3991 bfa_timer_start(bfa, &fcport->timer,
4004 bfa_fcport_is_disabled(struct bfa_s *bfa)
4006 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4014 bfa_fcport_is_dport(struct bfa_s *bfa)
4016 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4023 bfa_fcport_is_ddport(struct bfa_s *bfa)
4025 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4032 bfa_fcport_set_qos_bw(struct bfa_s *bfa, struct bfa_qos_bw_s *qos_bw)
4034 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4035 enum bfa_ioc_type_e ioc_type = bfa_get_type(bfa);
4037 bfa_trc(bfa, ioc_type);
4057 bfa_fcport_is_ratelim(struct bfa_s *bfa)
4059 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4069 bfa_fcport_get_ratelim_speed(struct bfa_s *bfa)
4071 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4073 bfa_trc(bfa, fcport->cfg.trl_def_speed);
4082 struct bfa_s *bfa = dev;
4083 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4085 bfa_trc(bfa, beacon);
4086 bfa_trc(bfa, link_e2e_beacon);
4087 bfa_trc(bfa, fcport->beacon);
4088 bfa_trc(bfa, fcport->link_e2e_beacon);
4095 bfa_fcport_is_linkup(struct bfa_s *bfa)
4097 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4106 bfa_fcport_is_qos_enabled(struct bfa_s *bfa)
4108 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4114 bfa_fcport_is_trunk_enabled(struct bfa_s *bfa)
4116 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4122 bfa_fcport_cfg_bbcr(struct bfa_s *bfa, bfa_boolean_t on_off, u8 bb_scn)
4124 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4126 bfa_trc(bfa, on_off);
4128 if (bfa_ioc_get_type(&fcport->bfa->ioc) != BFA_IOC_TYPE_FC)
4131 if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type) &&
4132 (bfa->ioc.attr->card_type != BFA_MFG_TYPE_CHINOOK))
4146 (fcport->cfg.speed < bfa_ioc_speed_sup(&bfa->ioc)))
4149 if (bfa_ioc_speed_sup(&bfa->ioc) < BFA_PORT_SPEED_8GBPS)
4176 bfa_fcport_get_bbcr_attr(struct bfa_s *bfa,
4179 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
4181 if (bfa_ioc_get_type(&fcport->bfa->ioc) != BFA_IOC_TYPE_FC)
4193 bfa_fcport_dportenable(struct bfa_s *bfa)
4198 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DPORTENABLE);
4199 bfa_port_set_dportenabled(&bfa->modules.port, BFA_TRUE);
4203 bfa_fcport_dportdisable(struct bfa_s *bfa)
4208 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DPORTDISABLE);
4209 bfa_port_set_dportenabled(&bfa->modules.port, BFA_FALSE);
4213 bfa_fcport_ddportenable(struct bfa_s *bfa)
4218 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DDPORTENABLE);
4222 bfa_fcport_ddportdisable(struct bfa_s *bfa)
4227 bfa_sm_send_event(BFA_FCPORT_MOD(bfa), BFA_FCPORT_SM_DDPORTDISABLE);
4239 bfa_trc(rp->bfa, rp->rport_tag);
4240 bfa_trc(rp->bfa, event);
4250 bfa_sm_fault(rp->bfa, event);
4257 bfa_trc(rp->bfa, rp->rport_tag);
4258 bfa_trc(rp->bfa, event);
4282 bfa_sm_fault(rp->bfa, event);
4292 bfa_trc(rp->bfa, rp->rport_tag);
4293 bfa_trc(rp->bfa, event);
4319 bfa_sm_fault(rp->bfa, event);
4329 bfa_trc(rp->bfa, rp->rport_tag);
4330 bfa_trc(rp->bfa, event);
4360 bfa_sm_fault(rp->bfa, event);
4372 bfa_trc(rp->bfa, rp->rport_tag);
4373 bfa_trc(rp->bfa, event);
4404 bfa_trc(rp->bfa, qos_scn->old_qos_attr.qos_flow_id);
4405 bfa_trc(rp->bfa, qos_scn->new_qos_attr.qos_flow_id);
4406 bfa_trc(rp->bfa, qos_scn->old_qos_attr.qos_priority);
4407 bfa_trc(rp->bfa, qos_scn->new_qos_attr.qos_priority);
4428 bfa_sm_fault(rp->bfa, event);
4438 bfa_trc(rp->bfa, rp->rport_tag);
4439 bfa_trc(rp->bfa, event);
4461 bfa_sm_fault(rp->bfa, event);
4468 bfa_trc(rp->bfa, rp->rport_tag);
4469 bfa_trc(rp->bfa, event);
4491 bfa_sm_fault(rp->bfa, event);
4501 bfa_trc(rp->bfa, rp->rport_tag);
4502 bfa_trc(rp->bfa, event);
4530 bfa_sm_fault(rp->bfa, event);
4540 bfa_trc(rp->bfa, rp->rport_tag);
4541 bfa_trc(rp->bfa, event);
4557 bfa_sm_fault(rp->bfa, event);
4564 bfa_trc(rp->bfa, rp->rport_tag);
4565 bfa_trc(rp->bfa, event);
4582 bfa_sm_fault(rp->bfa, event);
4593 bfa_trc(rp->bfa, rp->rport_tag);
4594 bfa_trc(rp->bfa, event);
4613 bfa_sm_fault(rp->bfa, event);
4624 bfa_trc(rp->bfa, rp->rport_tag);
4625 bfa_trc(rp->bfa, event);
4649 bfa_sm_fault(rp->bfa, event);
4659 bfa_trc(rp->bfa, rp->rport_tag);
4660 bfa_trc(rp->bfa, event);
4687 bfa_sm_fault(rp->bfa, event);
4725 struct bfa_s *bfa)
4727 struct bfa_mem_kva_s *rport_kva = BFA_MEM_RPORT_KVA(bfa);
4738 bfa_rport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
4741 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa);
4758 rp->bfa = bfa;
4778 bfa_rport_iocdisable(struct bfa_s *bfa)
4780 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa);
4808 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(rport->bfa);
4823 m = bfa_reqq_next(rp->bfa, BFA_REQQ_RPORT);
4825 bfa_reqq_wait(rp->bfa, BFA_REQQ_RPORT, &rp->reqq_wait);
4830 bfa_fn_lpu(rp->bfa));
4834 m->lp_fwtag = bfa_lps_get_fwtag(rp->bfa, (u8)rp->rport_info.lp_tag);
4844 bfa_reqq_produce(rp->bfa, BFA_REQQ_RPORT, m->mh);
4856 m = bfa_reqq_next(rp->bfa, BFA_REQQ_RPORT);
4858 bfa_reqq_wait(rp->bfa, BFA_REQQ_RPORT, &rp->reqq_wait);
4863 bfa_fn_lpu(rp->bfa));
4869 bfa_reqq_produce(rp->bfa, BFA_REQQ_RPORT, m->mh);
4881 m = bfa_reqq_next(rp->bfa, BFA_REQQ_RPORT);
4883 bfa_trc(rp->bfa, rp->rport_info.speed);
4888 bfa_fn_lpu(rp->bfa));
4895 bfa_reqq_produce(rp->bfa, BFA_REQQ_RPORT, m->mh);
4909 bfa_rport_isr(struct bfa_s *bfa, struct bfi_msg_s *m)
4914 bfa_trc(bfa, m->mhdr.msg_id);
4920 rp = BFA_RPORT_FROM_TAG(bfa, msg.create_rsp->bfa_handle);
4923 bfa_rport_set_lunmask(bfa, rp);
4929 rp = BFA_RPORT_FROM_TAG(bfa, msg.delete_rsp->bfa_handle);
4931 bfa_rport_unset_lunmask(bfa, rp);
4936 rp = BFA_RPORT_FROM_TAG(bfa, msg.qos_scn_evt->bfa_handle);
4942 bfa_fcport_update_loop_info(BFA_FCPORT_MOD(bfa),
4944 bfa_cb_rport_scn_online(bfa);
4948 bfa_cb_rport_scn_offline(bfa);
4952 rp = BFA_RPORT_FROM_TAG(bfa, msg.lip_scn->bfa_handle);
4957 bfa_trc(bfa, m->mhdr.msg_id);
4963 bfa_rport_res_recfg(struct bfa_s *bfa, u16 num_rport_fw)
4965 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa);
4980 bfa_rport_create(struct bfa_s *bfa, void *rport_drv)
4984 rp = bfa_rport_alloc(BFA_RPORT_MOD(bfa));
4989 rp->bfa = bfa;
5009 bfa_trc(rport->bfa, rport->rport_tag);
5031 bfa_rport_set_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp)
5033 struct bfa_lps_mod_s *lps_mod = BFA_LPS_MOD(bfa);
5042 bfa_fcpim_lunmask_rp_update(bfa, lp_wwn, rp_wwn, rp->rport_tag, lp_tag);
5047 bfa_rport_unset_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp)
5049 struct bfa_lps_mod_s *lps_mod = BFA_LPS_MOD(bfa);
5057 bfa_fcpim_lunmask_rp_update(bfa, lp_wwn, rp_wwn,
5070 struct bfa_s *bfa)
5072 struct bfa_sgpg_mod_s *sgpg_mod = BFA_SGPG_MOD(bfa);
5073 struct bfa_mem_kva_s *sgpg_kva = BFA_MEM_SGPG_KVA(bfa);
5104 bfa_sgpg_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
5107 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
5123 bfa_trc(bfa, cfg->drvcfg.num_sgpgs);
5167 bfa_sgpg_malloc(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpgs)
5169 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
5187 bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg)
5189 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
5209 bfa_sgpg_malloc(bfa, &wqe->sgpg_q, nsgpg);
5219 bfa_sgpg_wait(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe, int nsgpg)
5221 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
5245 bfa_sgpg_wcancel(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe)
5247 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa);
5253 bfa_sgpg_mfree(bfa, &wqe->sgpg_q,
5278 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(uf->bfa);
5302 bfa_fn_lpu(ufm->bfa));
5328 uf->bfa = ufm->bfa;
5351 struct bfa_s *bfa)
5353 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa);
5354 struct bfa_mem_kva_s *uf_kva = BFA_MEM_UF_KVA(bfa);
5378 bfa_uf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
5381 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa);
5383 ufm->bfa = bfa;
5412 uf_post_msg = bfa_reqq_next(ufm->bfa, BFA_REQQ_FCXP);
5418 bfa_reqq_produce(ufm->bfa, BFA_REQQ_FCXP, uf_post_msg->mh);
5420 bfa_trc(ufm->bfa, uf->uf_tag);
5438 uf_recv(struct bfa_s *bfa, struct bfi_uf_frm_rcvd_s *m)
5440 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa);
5461 bfa_plog_fchdr(bfa->plog, BFA_PL_MID_HAL_UF, BFA_PL_EID_RX,
5465 bfa_plog_fchdr_and_pl(bfa->plog, BFA_PL_MID_HAL_UF,
5470 if (bfa->fcs)
5473 bfa_cb_queue(bfa, &uf->hcb_qe, __bfa_cb_uf_recv, uf);
5477 bfa_uf_start(struct bfa_s *bfa)
5479 bfa_uf_post_all(BFA_UF_MOD(bfa));
5485 * @param[in] bfa BFA instance
5490 bfa_uf_recv_register(struct bfa_s *bfa, bfa_cb_uf_recv_t ufrecv, void *cbarg)
5492 struct bfa_uf_mod_s *ufm = BFA_UF_MOD(bfa);
5508 bfa_uf_put(BFA_UF_MOD(uf->bfa), uf);
5509 bfa_uf_post_all(BFA_UF_MOD(uf->bfa));
5518 bfa_uf_isr(struct bfa_s *bfa, struct bfi_msg_s *msg)
5520 bfa_trc(bfa, msg->mhdr.msg_id);
5524 uf_recv(bfa, (struct bfi_uf_frm_rcvd_s *) msg);
5528 bfa_trc(bfa, msg->mhdr.msg_id);
5534 bfa_uf_res_recfg(struct bfa_s *bfa, u16 num_uf_fw)
5536 struct bfa_uf_mod_s *mod = BFA_UF_MOD(bfa);
5595 struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(fcdiag->bfa);
5604 bfa_fcdiag_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
5607 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
5610 fcdiag->bfa = bfa;
5611 fcdiag->trcmod = bfa->trcmod;
5613 dport->bfa = bfa;
5623 bfa_fcdiag_iocdisable(struct bfa_s *bfa)
5625 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
5667 req = bfa_reqq_next(fcdiag->bfa, fcdiag->qtest.queue);
5673 bfa_fn_lpu(fcdiag->bfa));
5680 bfa_reqq_produce(fcdiag->bfa, fcdiag->qtest.queue, req->mh);
5767 lb_req = bfa_reqq_next(fcdiag->bfa, BFA_REQQ_DIAG);
5773 bfa_fn_lpu(fcdiag->bfa));
5781 bfa_reqq_produce(fcdiag->bfa, BFA_REQQ_DIAG, lb_req->mh);
5794 bfa_fcdiag_intr(struct bfa_s *bfa, struct bfi_msg_s *msg)
5796 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
5823 * @param[in] *bfa - bfa data struct
5835 bfa_fcdiag_loopback(struct bfa_s *bfa, enum bfa_port_opmode opmode,
5843 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
5845 if (!bfa_iocfc_is_operational(bfa))
5849 if (bfa_fcport_is_pbcdisabled(bfa)) {
5854 if (bfa_fcport_is_disabled(bfa) == BFA_FALSE) {
5862 if (bfa_ioc_get_type(&bfa->ioc) == BFA_IOC_TYPE_FC) {
5872 bfa_fcport_get_attr(bfa, &attr);
5887 (bfa_asic_id_ct2(bfa->ioc.pcidev.device_id))) {
5893 if (bfa_mfg_is_mezz(bfa->ioc.attr->card_type)) {
5894 if (bfa_ioc_get_type(&bfa->ioc) == BFA_IOC_TYPE_FC) {
5908 if (bfa_fcport_is_dport(bfa)) {
5937 * @param[in] *bfa - bfa data struct
5947 bfa_fcdiag_queuetest(struct bfa_s *bfa, u32 force, u32 queue,
5951 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
5956 if (!force && !bfa_iocfc_is_operational(bfa))
5990 bfa_timer_start(bfa, &fcdiag->qtest.timer,
6001 * @param[in] *bfa - bfa data struct
6006 bfa_fcdiag_lb_is_running(struct bfa_s *bfa)
6008 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
6039 bfa_trc(dport->bfa, event);
6043 bfa_fcport_dportenable(dport->bfa);
6060 bfa_fcport_ddportenable(dport->bfa);
6065 bfa_trc(dport->bfa, dport->i2hmsg.scn.state);
6071 bfa_sm_fault(dport->bfa, event);
6079 bfa_trc(dport->bfa, event);
6094 bfa_sm_fault(dport->bfa, event);
6101 bfa_trc(dport->bfa, event);
6118 bfa_fcport_dportdisable(dport->bfa);
6128 bfa_sm_fault(dport->bfa, event);
6135 bfa_trc(dport->bfa, event);
6146 bfa_fcport_dportdisable(dport->bfa);
6177 bfa_fcport_ddportdisable(dport->bfa);
6188 bfa_fcport_ddportdisable(dport->bfa);
6195 bfa_trc(dport->bfa, dport->i2hmsg.scn.state);
6196 bfa_sm_fault(dport->bfa, event);
6200 bfa_sm_fault(dport->bfa, event);
6208 bfa_trc(dport->bfa, event);
6227 bfa_sm_fault(dport->bfa, event);
6234 bfa_trc(dport->bfa, event);
6252 bfa_sm_fault(dport->bfa, event);
6260 bfa_trc(dport->bfa, event);
6275 bfa_sm_fault(dport->bfa, event);
6282 bfa_trc(dport->bfa, event);
6306 bfa_sm_fault(dport->bfa, event);
6314 bfa_trc(dport->bfa, event);
6322 bfa_fcport_enable(dport->bfa);
6326 bfa_trc(dport->bfa, dport->i2hmsg.scn.state);
6327 bfa_sm_fault(dport->bfa, event);
6338 bfa_sm_fault(dport->bfa, event);
6346 bfa_trc(dport->bfa, event);
6365 bfa_sm_fault(dport->bfa, event);
6377 m = bfa_reqq_next(dport->bfa, BFA_REQQ_DIAG);
6379 bfa_reqq_wait(dport->bfa, BFA_REQQ_PORT, &dport->reqq_wait);
6384 bfa_fn_lpu(dport->bfa));
6394 bfa_reqq_produce(dport->bfa, BFA_REQQ_DIAG, m->mh);
6417 bfa_trc(dport->bfa, msg->status);
6418 bfa_trc(dport->bfa, dport->rp_pwwn);
6419 bfa_trc(dport->bfa, dport->rp_nwwn);
6423 bfa_trc(dport->bfa, msg->status);
6450 bfa_trc(dport->bfa, msg->state);
6456 bfa_trc(dport->bfa, dport->result.end_time);
6459 bfa_trc(dport->bfa, dport->result.status);
6471 bfa_trc(dport->bfa, dport->result.roundtrip_latency);
6472 bfa_trc(dport->bfa, dport->result.est_cable_distance);
6473 bfa_trc(dport->bfa, dport->result.buffer_required);
6474 bfa_trc(dport->bfa, dport->result.frmsz);
6475 bfa_trc(dport->bfa, dport->result.speed);
6480 bfa_trc(dport->bfa, dport->result.subtest[i].status);
6506 bfa_trc(dport->bfa, subtesttype);
6507 bfa_trc(dport->bfa,
6519 bfa_sm_fault(dport->bfa, msg->state);
6528 * @param[in] *bfa - bfa data struct
6531 bfa_dport_enable(struct bfa_s *bfa, u32 lpcnt, u32 pat,
6534 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
6540 if (bfa_mfg_is_mezz(dport->bfa->ioc.attr->card_type)) {
6541 bfa_trc(dport->bfa, BFA_STATUS_PBC);
6548 if (!(bfa_asic_id_ct2(dport->bfa->ioc.pcidev.device_id))) {
6549 bfa_trc(dport->bfa, dport->bfa->ioc.pcidev.device_id);
6556 if (!bfa_iocfc_is_operational(bfa))
6560 if (bfa_fcport_is_pbcdisabled(bfa)) {
6561 bfa_trc(dport->bfa, BFA_STATUS_PBC);
6568 if (bfa_ioc_get_type(&bfa->ioc) != BFA_IOC_TYPE_FC) {
6569 bfa_trc(dport->bfa, bfa_ioc_get_type(&bfa->ioc));
6576 if ((bfa_fcport_get_cfg_topology(bfa) == BFA_PORT_TOPOLOGY_LOOP) ||
6577 (bfa_fcport_get_topology(bfa) == BFA_PORT_TOPOLOGY_LOOP)) {
6578 bfa_trc(dport->bfa, 0);
6585 if (bfa_fcport_is_trunk_enabled(bfa)) {
6586 bfa_trc(dport->bfa, 0);
6593 if (bfa_fcdiag_lb_is_running(bfa)) {
6594 bfa_trc(dport->bfa, 0);
6601 if ((bfa_fcport_is_disabled(bfa) == BFA_FALSE) &&
6602 (bfa_fcport_is_dport(bfa) == BFA_FALSE)) {
6603 bfa_trc(dport->bfa, 0);
6623 bfa_trc(dport->bfa, 0);
6627 bfa_trc(dport->bfa, lpcnt);
6628 bfa_trc(dport->bfa, pat);
6641 * @param[in] *bfa - bfa data struct
6644 bfa_dport_disable(struct bfa_s *bfa, bfa_cb_diag_t cbfn, void *cbarg)
6646 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
6649 if (bfa_ioc_is_disabled(&bfa->ioc))
6653 if (bfa_fcport_is_pbcdisabled(bfa)) {
6654 bfa_trc(dport->bfa, BFA_STATUS_PBC);
6668 if ((bfa_fcport_is_disabled(bfa) == BFA_FALSE) &&
6669 (bfa_fcport_is_dport(bfa) == BFA_FALSE)) {
6670 bfa_trc(dport->bfa, 0);
6684 bfa_trc(dport->bfa, 0);
6698 * @param[in] *bfa - bfa data struct
6701 bfa_dport_start(struct bfa_s *bfa, u32 lpcnt, u32 pat,
6704 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
6710 if (!bfa_iocfc_is_operational(bfa))
6730 bfa_trc(dport->bfa, 0);
6743 bfa_trc(dport->bfa, lpcnt);
6744 bfa_trc(dport->bfa, pat);
6759 * @param[in] *bfa - bfa data struct
6762 bfa_dport_show(struct bfa_s *bfa, struct bfa_diag_dport_result_s *result)
6764 struct bfa_fcdiag_s *fcdiag = BFA_FCDIAG_MOD(bfa);
6770 if (!bfa_iocfc_is_operational(bfa))
6783 bfa_trc(dport->bfa, 0);