Lines Matching refs:bgx
53 #define NIC_SET_VF_LMAC_MAP(bgx, lmac) (((bgx & 0xF) << 4) | (lmac & 0xF)) argument
231 static void nic_get_bgx_stats(struct nicpf *nic, struct bgx_stats_msg *bgx) in nic_get_bgx_stats() argument
236 bgx_idx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[bgx->vf_id]); in nic_get_bgx_stats()
237 lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[bgx->vf_id]); in nic_get_bgx_stats()
240 mbx.bgx_stats.vf_id = bgx->vf_id; in nic_get_bgx_stats()
241 mbx.bgx_stats.rx = bgx->rx; in nic_get_bgx_stats()
242 mbx.bgx_stats.idx = bgx->idx; in nic_get_bgx_stats()
243 if (bgx->rx) in nic_get_bgx_stats()
245 lmac, bgx->idx); in nic_get_bgx_stats()
248 lmac, bgx->idx); in nic_get_bgx_stats()
249 nic_send_msg_to_vf(nic, bgx->vf_id, &mbx); in nic_get_bgx_stats()
255 int bgx, lmac, lmac_cnt; in nic_update_hw_frs() local
261 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_update_hw_frs()
263 lmac += bgx * MAX_LMAC_PER_BGX; in nic_update_hw_frs()
268 lmac_cnt = bgx_get_lmac_count(nic->node, bgx); in nic_update_hw_frs()
320 int bgx, next_bgx_lmac = 0; in nic_set_lmac_vf_mapping() local
326 for (bgx = 0; bgx < nic->hw->bgx_cnt; bgx++) { in nic_set_lmac_vf_mapping()
327 if (!(bgx_map & (1 << bgx))) in nic_set_lmac_vf_mapping()
329 lmac_cnt = bgx_get_lmac_count(nic->node, bgx); in nic_set_lmac_vf_mapping()
332 NIC_SET_VF_LMAC_MAP(bgx, lmac); in nic_set_lmac_vf_mapping()
341 lmac = bgx * MAX_LMAC_PER_BGX; in nic_set_lmac_vf_mapping()
342 for (; lmac < lmac_cnt + (bgx * MAX_LMAC_PER_BGX); lmac++) in nic_set_lmac_vf_mapping()
475 u32 vnic, bgx, lmac, chan; in nic_config_cpi() local
481 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vnic]); in nic_config_cpi()
484 chan = (lmac * hw->chans_per_lmac) + (bgx * hw->chans_per_bgx); in nic_config_cpi()
615 u32 bgx, lmac, chan; in nic_tx_channel_cfg() local
627 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[pqs_vnic]); in nic_tx_channel_cfg()
637 tl4 = bgx * (hw->tl4_cnt / hw->bgx_cnt); in nic_tx_channel_cfg()
669 chan = (lmac * hw->chans_per_lmac) + (bgx * hw->chans_per_bgx); in nic_tx_channel_cfg()
692 lmac + (bgx * MAX_LMAC_PER_BGX)); in nic_tx_channel_cfg()
848 int bgx, lmac; in nic_enable_vf() local
855 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_enable_vf()
858 bgx_lmac_rx_tx_enable(nic->node, bgx, lmac, enable); in nic_enable_vf()
863 int bgx, lmac; in nic_pause_frame() local
869 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_pause_frame()
873 bgx_lmac_get_pfc(nic->node, bgx, lmac, &pfc); in nic_pause_frame()
880 bgx_lmac_set_pfc(nic->node, bgx, lmac, cfg); in nic_pause_frame()
931 u8 bgx, lmac; in nic_link_status_get() local
936 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_link_status_get()
940 bgx_get_lmac_link_state(nic->node, bgx, lmac, &link); in nic_link_status_get()
960 int bgx, lmac; in nic_handle_mbx_intr() local
1034 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[lmac]); in nic_handle_mbx_intr()
1036 bgx_set_lmac_mac(nic->node, bgx, lmac, mbx.mac.mac_addr); in nic_handle_mbx_intr()
1095 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_handle_mbx_intr()
1097 bgx_reset_xcast_mode(nic->node, bgx, lmac, in nic_handle_mbx_intr()
1107 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_handle_mbx_intr()
1109 bgx_set_dmac_cam_filter(nic->node, bgx, lmac, in nic_handle_mbx_intr()
1120 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_handle_mbx_intr()
1122 bgx_set_xcast_mode(nic->node, bgx, lmac, mbx.xcast.mode); in nic_handle_mbx_intr()