Lines Matching refs:vf_info
829 struct fm10k_vf_info *vf_info) in fm10k_iov_assign_default_mac_vlan_pf() argument
837 if (!vf_info || vf_info->vf_idx >= hw->iov.num_vfs) in fm10k_iov_assign_default_mac_vlan_pf()
845 vf_idx = vf_info->vf_idx; in fm10k_iov_assign_default_mac_vlan_pf()
854 if (vf_info->pf_vid) in fm10k_iov_assign_default_mac_vlan_pf()
855 vf_vid = vf_info->pf_vid | FM10K_VLAN_OVERRIDE; in fm10k_iov_assign_default_mac_vlan_pf()
857 vf_vid = vf_info->sw_vid; in fm10k_iov_assign_default_mac_vlan_pf()
862 vf_info->mac, vf_vid); in fm10k_iov_assign_default_mac_vlan_pf()
877 if (vf_info->mbx.ops.enqueue_tx) { in fm10k_iov_assign_default_mac_vlan_pf()
878 err = vf_info->mbx.ops.enqueue_tx(hw, &vf_info->mbx, msg); in fm10k_iov_assign_default_mac_vlan_pf()
908 if (is_valid_ether_addr(vf_info->mac)) { in fm10k_iov_assign_default_mac_vlan_pf()
909 tdbal = (((u32)vf_info->mac[3]) << 24) | in fm10k_iov_assign_default_mac_vlan_pf()
910 (((u32)vf_info->mac[4]) << 16) | in fm10k_iov_assign_default_mac_vlan_pf()
911 (((u32)vf_info->mac[5]) << 8); in fm10k_iov_assign_default_mac_vlan_pf()
914 (((u32)vf_info->mac[0]) << 16) | in fm10k_iov_assign_default_mac_vlan_pf()
915 (((u32)vf_info->mac[1]) << 8) | in fm10k_iov_assign_default_mac_vlan_pf()
916 ((u32)vf_info->mac[2]); in fm10k_iov_assign_default_mac_vlan_pf()
944 struct fm10k_vf_info *vf_info) in fm10k_iov_reset_resources_pf() argument
949 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_reset_resources_pf()
960 vf_info->mbx.timeout = 0; in fm10k_iov_reset_resources_pf()
961 if (vf_info->mbx.ops.disconnect) in fm10k_iov_reset_resources_pf()
962 vf_info->mbx.ops.disconnect(hw, &vf_info->mbx); in fm10k_iov_reset_resources_pf()
983 if (vf_info->pf_vid) in fm10k_iov_reset_resources_pf()
984 vf_vid = vf_info->pf_vid; in fm10k_iov_reset_resources_pf()
986 vf_vid = vf_info->sw_vid; in fm10k_iov_reset_resources_pf()
1030 fm10k_write_reg(hw, FM10K_VLAN_TABLE(vf_info->vsi, i), 0); in fm10k_iov_reset_resources_pf()
1032 fm10k_write_reg(hw, FM10K_RETA(vf_info->vsi, i), 0); in fm10k_iov_reset_resources_pf()
1034 fm10k_write_reg(hw, FM10K_RSSRK(vf_info->vsi, i), 0); in fm10k_iov_reset_resources_pf()
1035 fm10k_write_reg(hw, FM10K_MRQC(vf_info->vsi), 0); in fm10k_iov_reset_resources_pf()
1038 if (is_valid_ether_addr(vf_info->mac)) { in fm10k_iov_reset_resources_pf()
1039 tdbal = (((u32)vf_info->mac[3]) << 24) | in fm10k_iov_reset_resources_pf()
1040 (((u32)vf_info->mac[4]) << 16) | in fm10k_iov_reset_resources_pf()
1041 (((u32)vf_info->mac[5]) << 8); in fm10k_iov_reset_resources_pf()
1043 (((u32)vf_info->mac[0]) << 16) | in fm10k_iov_reset_resources_pf()
1044 (((u32)vf_info->mac[1]) << 8) | in fm10k_iov_reset_resources_pf()
1045 ((u32)vf_info->mac[2]); in fm10k_iov_reset_resources_pf()
1082 struct fm10k_vf_info *vf_info, in fm10k_iov_set_lport_pf() argument
1091 vf_info->vf_flags = flags | FM10K_VF_FLAG_NONE_CAPABLE; in fm10k_iov_set_lport_pf()
1092 vf_info->glort = glort; in fm10k_iov_set_lport_pf()
1106 struct fm10k_vf_info *vf_info) in fm10k_iov_reset_lport_pf() argument
1111 if (FM10K_VF_FLAG_ENABLED(vf_info)) { in fm10k_iov_reset_lport_pf()
1113 fm10k_update_lport_state_pf(hw, vf_info->glort, 1, false); in fm10k_iov_reset_lport_pf()
1117 vf_info->mbx.ops.enqueue_tx(hw, &vf_info->mbx, msg); in fm10k_iov_reset_lport_pf()
1121 vf_info->vf_flags = 0; in fm10k_iov_reset_lport_pf()
1122 vf_info->glort = 0; in fm10k_iov_reset_lport_pf()
1158 struct fm10k_vf_info *vf_info = (struct fm10k_vf_info *)mbx; in fm10k_iov_msg_msix_pf() local
1159 u8 vf_idx = vf_info->vf_idx; in fm10k_iov_msg_msix_pf()
1172 s32 fm10k_iov_select_vid(struct fm10k_vf_info *vf_info, u16 vid) in fm10k_iov_select_vid() argument
1175 return vf_info->pf_vid ? vf_info->pf_vid : vf_info->sw_vid; in fm10k_iov_select_vid()
1176 else if (vf_info->pf_vid && vid != vf_info->pf_vid) in fm10k_iov_select_vid()
1195 struct fm10k_vf_info *vf_info = (struct fm10k_vf_info *)mbx; in fm10k_iov_msg_mac_vlan_pf() local
1204 if (!FM10K_VF_FLAG_ENABLED(vf_info)) in fm10k_iov_msg_mac_vlan_pf()
1232 if (vf_info->pf_vid) in fm10k_iov_msg_mac_vlan_pf()
1235 err = fm10k_iov_select_vid(vf_info, (u16)vid); in fm10k_iov_msg_mac_vlan_pf()
1243 err = hw->mac.ops.update_vlan(hw, vid, vf_info->vsi, set); in fm10k_iov_msg_mac_vlan_pf()
1255 if (is_valid_ether_addr(vf_info->mac) && in fm10k_iov_msg_mac_vlan_pf()
1256 !ether_addr_equal(mac, vf_info->mac)) in fm10k_iov_msg_mac_vlan_pf()
1262 err = fm10k_iov_select_vid(vf_info, vlan); in fm10k_iov_msg_mac_vlan_pf()
1269 err = hw->mac.ops.update_uc_addr(hw, vf_info->glort, in fm10k_iov_msg_mac_vlan_pf()
1282 if (!(vf_info->vf_flags & FM10K_VF_FLAG_MULTI_ENABLED)) in fm10k_iov_msg_mac_vlan_pf()
1288 err = fm10k_iov_select_vid(vf_info, vlan); in fm10k_iov_msg_mac_vlan_pf()
1295 err = hw->mac.ops.update_mc_addr(hw, vf_info->glort, in fm10k_iov_msg_mac_vlan_pf()
1310 static u8 fm10k_iov_supported_xcast_mode_pf(struct fm10k_vf_info *vf_info, in fm10k_iov_supported_xcast_mode_pf() argument
1313 u8 vf_flags = vf_info->vf_flags; in fm10k_iov_supported_xcast_mode_pf()
1354 struct fm10k_vf_info *vf_info = (struct fm10k_vf_info *)mbx; in fm10k_iov_msg_lport_state_pf() local
1360 if (!(vf_info->vf_flags & FM10K_VF_FLAG_NONE_CAPABLE)) in fm10k_iov_msg_lport_state_pf()
1372 mode = fm10k_iov_supported_xcast_mode_pf(vf_info, mode); in fm10k_iov_msg_lport_state_pf()
1375 if (!(FM10K_VF_FLAG_ENABLED(vf_info) & BIT(mode))) in fm10k_iov_msg_lport_state_pf()
1376 fm10k_update_xcast_mode_pf(hw, vf_info->glort, mode); in fm10k_iov_msg_lport_state_pf()
1382 if (FM10K_VF_FLAG_ENABLED(vf_info)) in fm10k_iov_msg_lport_state_pf()
1383 err = fm10k_update_lport_state_pf(hw, vf_info->glort, in fm10k_iov_msg_lport_state_pf()
1392 vf_info->vf_flags = FM10K_VF_FLAG_CAPABLE(vf_info); in fm10k_iov_msg_lport_state_pf()
1395 hw->iov.ops.configure_tc(hw, vf_info->vf_idx, vf_info->rate); in fm10k_iov_msg_lport_state_pf()
1407 if (!err && (!FM10K_VF_FLAG_ENABLED(vf_info) != !mode)) in fm10k_iov_msg_lport_state_pf()
1408 err = fm10k_update_lport_state_pf(hw, vf_info->glort, 1, in fm10k_iov_msg_lport_state_pf()
1412 mode |= FM10K_VF_FLAG_CAPABLE(vf_info); in fm10k_iov_msg_lport_state_pf()
1414 vf_info->vf_flags = mode; in fm10k_iov_msg_lport_state_pf()