Lines Matching refs:cgxd
47 void *cgxd; in is_mac_feature_supported() local
53 cgxd = rvu_cgx_pdata(cgx_id, rvu); in is_mac_feature_supported()
55 return (cgx_features_get(cgxd) & feature); in is_mac_feature_supported()
96 void *cgxd = NULL; in rvu_first_cgx_pdata() local
99 cgxd = rvu_cgx_pdata(first_enabled_cgx, rvu); in rvu_first_cgx_pdata()
100 if (cgxd) in rvu_first_cgx_pdata()
104 return cgxd; in rvu_first_cgx_pdata()
311 void *cgxd; in cgx_lmac_event_handler_init() local
326 cgxd = rvu_cgx_pdata(cgx, rvu); in cgx_lmac_event_handler_init()
327 if (!cgxd) in cgx_lmac_event_handler_init()
329 lmac_bmap = cgx_get_lmac_bmap(cgxd); in cgx_lmac_event_handler_init()
331 err = cgx_lmac_evh_register(&cb, cgxd, lmac); in cgx_lmac_event_handler_init()
354 void *cgxd; in rvu_cgx_init() local
381 cgxd = rvu_cgx_pdata(cgx, rvu); in rvu_cgx_init()
382 if (!cgxd) in rvu_cgx_init()
384 mac_ops = get_mac_ops(cgxd); in rvu_cgx_init()
385 mac_ops->mac_x2p_reset(cgxd, false); in rvu_cgx_init()
403 void *cgxd; in cgx_start_linkup() local
407 cgxd = rvu_cgx_pdata(cgx, rvu); in cgx_start_linkup()
408 if (!cgxd) in cgx_start_linkup()
410 mac_ops = get_mac_ops(cgxd); in cgx_start_linkup()
411 lmac_bmap = cgx_get_lmac_bmap(cgxd); in cgx_start_linkup()
413 mac_ops->mac_enadis_rx(cgxd, lmac, true); in cgx_start_linkup()
418 cgxd = rvu_cgx_pdata(cgx, rvu); in cgx_start_linkup()
419 if (!cgxd) in cgx_start_linkup()
421 err = cgx_lmac_linkup_start(cgxd); in cgx_start_linkup()
433 void *cgxd; in rvu_cgx_exit() local
436 cgxd = rvu_cgx_pdata(cgx, rvu); in rvu_cgx_exit()
437 if (!cgxd) in rvu_cgx_exit()
439 lmac_bmap = cgx_get_lmac_bmap(cgxd); in rvu_cgx_exit()
441 cgx_lmac_evh_unregister(cgxd, lmac); in rvu_cgx_exit()
467 void *cgxd; in rvu_cgx_enadis_rx_bp() local
473 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_cgx_enadis_rx_bp()
475 mac_ops = get_mac_ops(cgxd); in rvu_cgx_enadis_rx_bp()
478 mac_ops->mac_enadis_rx_pause_fwding(cgxd, lmac_id, true); in rvu_cgx_enadis_rx_bp()
480 mac_ops->mac_enadis_rx_pause_fwding(cgxd, lmac_id, false); in rvu_cgx_enadis_rx_bp()
488 void *cgxd; in rvu_cgx_config_rxtx() local
494 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_cgx_config_rxtx()
495 mac_ops = get_mac_ops(cgxd); in rvu_cgx_config_rxtx()
497 return mac_ops->mac_rx_tx_enable(cgxd, lmac_id, start); in rvu_cgx_config_rxtx()
505 void *cgxd; in rvu_cgx_tx_enable() local
511 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_cgx_tx_enable()
512 mac_ops = get_mac_ops(cgxd); in rvu_cgx_tx_enable()
514 return mac_ops->mac_tx_enable(cgxd, lmac_id, enable); in rvu_cgx_tx_enable()
517 int rvu_cgx_config_tx(void *cgxd, int lmac_id, bool enable) in rvu_cgx_config_tx() argument
521 mac_ops = get_mac_ops(cgxd); in rvu_cgx_config_tx()
522 return mac_ops->mac_tx_enable(cgxd, lmac_id, enable); in rvu_cgx_config_tx()
583 void *cgxd; in rvu_lmac_get_stats() local
589 cgxd = rvu_cgx_pdata(cgx_idx, rvu); in rvu_lmac_get_stats()
590 mac_ops = get_mac_ops(cgxd); in rvu_lmac_get_stats()
594 err = mac_ops->mac_get_rx_stats(cgxd, lmac, stat, &rx_stat); in rvu_lmac_get_stats()
607 err = mac_ops->mac_get_tx_stats(cgxd, lmac, stat, &tx_stat); in rvu_lmac_get_stats()
638 void *cgxd; in rvu_mbox_handler_cgx_stats_rst() local
654 cgxd = rvu_cgx_pdata(cgx_idx, rvu); in rvu_mbox_handler_cgx_stats_rst()
655 mac_ops = get_mac_ops(cgxd); in rvu_mbox_handler_cgx_stats_rst()
657 return mac_ops->mac_stats_reset(cgxd, lmac); in rvu_mbox_handler_cgx_stats_rst()
667 void *cgxd; in rvu_mbox_handler_cgx_fec_stats() local
673 cgxd = rvu_cgx_pdata(cgx_idx, rvu); in rvu_mbox_handler_cgx_fec_stats()
674 mac_ops = get_mac_ops(cgxd); in rvu_mbox_handler_cgx_fec_stats()
675 return mac_ops->get_fec_stats(cgxd, lmac, rsp); in rvu_mbox_handler_cgx_fec_stats()
832 void *cgxd; in rvu_cgx_ptp_rx_cfg() local
844 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_cgx_ptp_rx_cfg()
846 mac_ops = get_mac_ops(cgxd); in rvu_cgx_ptp_rx_cfg()
847 mac_ops->mac_enadis_ptp_config(cgxd, lmac_id, enable); in rvu_cgx_ptp_rx_cfg()
936 void *cgxd; in rvu_mbox_handler_cgx_features_get() local
942 cgxd = rvu_cgx_pdata(cgx_idx, rvu); in rvu_mbox_handler_cgx_features_get()
943 rsp->lmac_features = cgx_features_get(cgxd); in rvu_mbox_handler_cgx_features_get()
950 void *cgxd = rvu_first_cgx_pdata(rvu); in rvu_cgx_get_fifolen() local
952 if (!cgxd) in rvu_cgx_get_fifolen()
955 return cgx_get_fifo_len(cgxd); in rvu_cgx_get_fifolen()
961 void *cgxd; in rvu_cgx_get_lmac_fifolen() local
963 cgxd = rvu_cgx_pdata(cgx, rvu); in rvu_cgx_get_lmac_fifolen()
964 if (!cgxd) in rvu_cgx_get_lmac_fifolen()
967 mac_ops = get_mac_ops(cgxd); in rvu_cgx_get_lmac_fifolen()
971 return mac_ops->lmac_fifo_len(cgxd, lmac); in rvu_cgx_get_lmac_fifolen()
1010 void *cgxd; in rvu_cgx_cfg_pause_frm() local
1022 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_cgx_cfg_pause_frm()
1023 mac_ops = get_mac_ops(cgxd); in rvu_cgx_cfg_pause_frm()
1025 mac_ops->mac_get_pfc_frm_cfg(cgxd, lmac_id, &tx_pfc, &rx_pfc); in rvu_cgx_cfg_pause_frm()
1033 if (verify_lmac_fc_cfg(cgxd, lmac_id, tx_pause, rx_pause, in rvu_cgx_cfg_pause_frm()
1040 return mac_ops->mac_enadis_pause_frm(cgxd, lmac_id, tx_pause, rx_pause); in rvu_cgx_cfg_pause_frm()
1051 void *cgxd; in rvu_mbox_handler_cgx_cfg_pause_frm() local
1060 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_mbox_handler_cgx_cfg_pause_frm()
1061 mac_ops = get_mac_ops(cgxd); in rvu_mbox_handler_cgx_cfg_pause_frm()
1066 mac_ops->mac_get_pause_frm_status(cgxd, lmac_id, &rsp->tx_pause, &rsp->rx_pause); in rvu_mbox_handler_cgx_cfg_pause_frm()
1087 int rvu_cgx_nix_cuml_stats(struct rvu *rvu, void *cgxd, int lmac_id, in rvu_cgx_nix_cuml_stats() argument
1097 if (!cgxd || !rvu) in rvu_cgx_nix_cuml_stats()
1100 pf = cgxlmac_to_pf(rvu, cgx_get_cgxid(cgxd), lmac_id); in rvu_cgx_nix_cuml_stats()
1225 void *cgxd; in rvu_mbox_handler_cgx_set_link_mode() local
1231 cgxd = rvu_cgx_pdata(cgx_idx, rvu); in rvu_mbox_handler_cgx_set_link_mode()
1232 rsp->status = cgx_set_link_mode(cgxd, req->args, cgx_idx, lmac); in rvu_mbox_handler_cgx_set_link_mode()
1277 void *cgxd; in rvu_cgx_prio_flow_ctrl_cfg() local
1286 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_cgx_prio_flow_ctrl_cfg()
1287 mac_ops = get_mac_ops(cgxd); in rvu_cgx_prio_flow_ctrl_cfg()
1289 mac_ops->mac_get_pause_frm_status(cgxd, lmac_id, &tx_8023, &rx_8023); in rvu_cgx_prio_flow_ctrl_cfg()
1297 if (verify_lmac_fc_cfg(cgxd, lmac_id, tx_pause, rx_pause, in rvu_cgx_prio_flow_ctrl_cfg()
1304 return mac_ops->pfc_config(cgxd, lmac_id, tx_pause, rx_pause, pfc_en); in rvu_cgx_prio_flow_ctrl_cfg()
1314 void *cgxd; in rvu_mbox_handler_cgx_prio_flow_ctrl_cfg() local
1324 cgxd = rvu_cgx_pdata(cgx_id, rvu); in rvu_mbox_handler_cgx_prio_flow_ctrl_cfg()
1325 mac_ops = get_mac_ops(cgxd); in rvu_mbox_handler_cgx_prio_flow_ctrl_cfg()
1330 mac_ops->mac_get_pfc_frm_cfg(cgxd, lmac_id, &rsp->tx_pause, &rsp->rx_pause); in rvu_mbox_handler_cgx_prio_flow_ctrl_cfg()
1338 struct cgx *cgxd; in rvu_mac_reset() local
1345 cgxd = rvu_cgx_pdata(cgx, rvu); in rvu_mac_reset()
1346 mac_ops = get_mac_ops(cgxd); in rvu_mac_reset()
1348 if (mac_ops->mac_reset(cgxd, lmac, !is_vf(pcifunc))) in rvu_mac_reset()