Lines Matching refs:lmac

53 #define	NIC_SET_VF_LMAC_MAP(bgx, lmac)	(((bgx & 0xF) << 4) | (lmac & 0xF))  argument
161 int bgx_idx, lmac; in nic_mbx_send_ready() local
171 lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_mbx_send_ready()
173 mac = bgx_get_lmac_mac(nic->node, bgx_idx, lmac); in nic_mbx_send_ready()
233 int bgx_idx, lmac; in nic_get_bgx_stats() local
237 lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[bgx->vf_id]); in nic_get_bgx_stats()
245 lmac, bgx->idx); in nic_get_bgx_stats()
248 lmac, bgx->idx); in nic_get_bgx_stats()
255 int bgx, lmac, lmac_cnt; in nic_update_hw_frs() local
262 lmac = NIC_GET_LMAC_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()
269 lmac_credits = nic_reg_read(nic, NIC_PF_LMAC_0_7_CREDIT + (lmac * 8)); in nic_update_hw_frs()
272 nic_reg_write(nic, NIC_PF_LMAC_0_7_CREDIT + (lmac * 8), lmac_credits); in nic_update_hw_frs()
279 NIC_PF_LMAC_0_7_CFG2 + (lmac * 8), new_frs); in nic_update_hw_frs()
286 int lmac, max_lmac; in nic_set_tx_pkt_pad() local
306 for (lmac = 0; lmac < max_lmac; lmac++) { in nic_set_tx_pkt_pad()
307 lmac_cfg = nic_reg_read(nic, NIC_PF_LMAC_0_7_CFG | (lmac << 3)); in nic_set_tx_pkt_pad()
310 nic_reg_write(nic, NIC_PF_LMAC_0_7_CFG | (lmac << 3), lmac_cfg); in nic_set_tx_pkt_pad()
321 int lmac, lmac_cnt = 0; in nic_set_lmac_vf_mapping() local
330 for (lmac = 0; lmac < lmac_cnt; lmac++) 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()
344 NIC_PF_LMAC_0_7_CREDIT + (lmac * 8), in nic_set_lmac_vf_mapping()
475 u32 vnic, bgx, lmac, chan; in nic_config_cpi() local
482 lmac = NIC_GET_LMAC_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
628 lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[pqs_vnic]); in nic_tx_channel_cfg()
639 tl4 += (lmac * MAX_QUEUES_PER_QSET); in nic_tx_channel_cfg()
646 tl4 += (lmac * MAX_QUEUES_PER_QSET * MAX_SQS_PER_VF); 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
856 lmac = NIC_GET_LMAC_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
870 lmac = NIC_GET_LMAC_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()
889 u8 lmac, bgx_idx; in nic_config_timestamp() local
896 lmac = NIC_GET_LMAC_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_config_timestamp()
898 pkind_idx = lmac + bgx_idx * MAX_LMAC_PER_BGX; in nic_config_timestamp()
909 bgx_config_timestamping(nic->node, bgx_idx, lmac, true); in nic_config_timestamp()
915 bgx_config_timestamping(nic->node, bgx_idx, lmac, false); in nic_config_timestamp()
931 u8 bgx, lmac; in nic_link_status_get() local
937 lmac = NIC_GET_LMAC_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
1033 lmac = mbx.mac.vf_id; in nic_handle_mbx_intr()
1034 bgx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[lmac]); in nic_handle_mbx_intr()
1035 lmac = NIC_GET_LMAC_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()
1096 lmac = NIC_GET_LMAC_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()
1108 lmac = NIC_GET_LMAC_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()
1121 lmac = NIC_GET_LMAC_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()