Lines Matching refs:sriov

142 	struct qlcnic_sriov *sriov;  in qlcnic_sriov_init()  local
152 sriov = kzalloc(sizeof(struct qlcnic_sriov), GFP_KERNEL); in qlcnic_sriov_init()
153 if (!sriov) in qlcnic_sriov_init()
156 adapter->ahw->sriov = sriov; in qlcnic_sriov_init()
157 sriov->num_vfs = num_vfs; in qlcnic_sriov_init()
158 bc = &sriov->bc; in qlcnic_sriov_init()
159 sriov->vf_info = kcalloc(num_vfs, sizeof(struct qlcnic_vf_info), in qlcnic_sriov_init()
161 if (!sriov->vf_info) { in qlcnic_sriov_init()
190 vf = &sriov->vf_info[i]; in qlcnic_sriov_init()
209 sriov->vf_info[i].vp = vp; in qlcnic_sriov_init()
225 kfree(sriov->vf_info[i].vp); in qlcnic_sriov_init()
232 kfree(sriov->vf_info); in qlcnic_sriov_init()
235 kfree(adapter->ahw->sriov); in qlcnic_sriov_init()
263 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in __qlcnic_sriov_cleanup() local
264 struct qlcnic_back_channel *bc = &sriov->bc; in __qlcnic_sriov_cleanup()
274 for (i = 0; i < sriov->num_vfs; i++) { in __qlcnic_sriov_cleanup()
275 vf = &sriov->vf_info[i]; in __qlcnic_sriov_cleanup()
283 for (i = 0; i < sriov->num_vfs; i++) in __qlcnic_sriov_cleanup()
284 kfree(sriov->vf_info[i].vp); in __qlcnic_sriov_cleanup()
286 kfree(sriov->vf_info); in __qlcnic_sriov_cleanup()
287 kfree(adapter->ahw->sriov); in __qlcnic_sriov_cleanup()
436 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_set_guest_vlan_mode() local
440 if (sriov->allowed_vlans) in qlcnic_sriov_set_guest_vlan_mode()
443 sriov->any_vlan = cmd->rsp.arg[2] & 0xf; in qlcnic_sriov_set_guest_vlan_mode()
444 sriov->num_allowed_vlans = cmd->rsp.arg[2] >> 16; in qlcnic_sriov_set_guest_vlan_mode()
446 sriov->num_allowed_vlans); in qlcnic_sriov_set_guest_vlan_mode()
452 if (!sriov->any_vlan) in qlcnic_sriov_set_guest_vlan_mode()
455 num_vlans = sriov->num_allowed_vlans; in qlcnic_sriov_set_guest_vlan_mode()
456 sriov->allowed_vlans = kcalloc(num_vlans, sizeof(u16), GFP_KERNEL); in qlcnic_sriov_set_guest_vlan_mode()
457 if (!sriov->allowed_vlans) in qlcnic_sriov_set_guest_vlan_mode()
462 sriov->allowed_vlans[i] = vlans[i]; in qlcnic_sriov_set_guest_vlan_mode()
469 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_get_vf_acl() local
483 sriov->vlan_mode = cmd.rsp.arg[1] & 0x3; in qlcnic_sriov_get_vf_acl()
484 switch (sriov->vlan_mode) { in qlcnic_sriov_get_vf_acl()
684 struct qlcnic_vf_info *vf_info = adapter->ahw->sriov->vf_info; in qlcnic_sriov_func_to_index()
690 for (i = 0; i < adapter->ahw->sriov->num_vfs; i++) { in qlcnic_sriov_func_to_index()
849 static void qlcnic_sriov_schedule_bc_cmd(struct qlcnic_sriov *sriov, in qlcnic_sriov_schedule_bc_cmd() argument
857 queue_work(sriov->bc.bc_trans_wq, &vf->trans_work); in qlcnic_sriov_schedule_bc_cmd()
1015 vf = &adapter->ahw->sriov->vf_info[index]; in qlcnic_sriov_send_bc_cmd()
1082 qlcnic_sriov_schedule_bc_cmd(adapter->ahw->sriov, vf, in qlcnic_sriov_process_bc_cmd()
1118 int __qlcnic_sriov_add_act_list(struct qlcnic_sriov *sriov, in __qlcnic_sriov_add_act_list() argument
1127 qlcnic_sriov_schedule_bc_cmd(sriov, vf, in __qlcnic_sriov_add_act_list()
1132 static int qlcnic_sriov_add_act_list(struct qlcnic_sriov *sriov, in qlcnic_sriov_add_act_list() argument
1140 __qlcnic_sriov_add_act_list(sriov, vf, trans); in qlcnic_sriov_add_act_list()
1146 static void qlcnic_sriov_handle_pending_trans(struct qlcnic_sriov *sriov, in qlcnic_sriov_handle_pending_trans() argument
1184 if (qlcnic_sriov_add_act_list(sriov, vf, trans)) in qlcnic_sriov_handle_pending_trans()
1190 static void qlcnic_sriov_handle_bc_cmd(struct qlcnic_sriov *sriov, in qlcnic_sriov_handle_bc_cmd() argument
1210 qlcnic_sriov_handle_pending_trans(sriov, vf, hdr); in qlcnic_sriov_handle_bc_cmd()
1252 if (qlcnic_sriov_add_act_list(sriov, vf, trans)) { in qlcnic_sriov_handle_bc_cmd()
1264 static void qlcnic_sriov_handle_msg_event(struct qlcnic_sriov *sriov, in qlcnic_sriov_handle_msg_event() argument
1277 qlcnic_sriov_handle_bc_cmd(sriov, &hdr, vf); in qlcnic_sriov_handle_msg_event()
1285 static void qlcnic_sriov_handle_flr_event(struct qlcnic_sriov *sriov, in qlcnic_sriov_handle_flr_event() argument
1291 qlcnic_sriov_pf_handle_flr(sriov, vf); in qlcnic_sriov_handle_flr_event()
1300 struct qlcnic_sriov *sriov; in qlcnic_sriov_handle_bc_event() local
1304 sriov = adapter->ahw->sriov; in qlcnic_sriov_handle_bc_event()
1311 vf = &sriov->vf_info[index]; in qlcnic_sriov_handle_bc_event()
1318 qlcnic_sriov_handle_flr_event(sriov, vf); in qlcnic_sriov_handle_bc_event()
1323 qlcnic_sriov_handle_msg_event(sriov, vf); in qlcnic_sriov_handle_bc_event()
1381 u16 seq = ++adapter->ahw->sriov->bc.trans_counter; in __qlcnic_sriov_issue_cmd()
1469 struct qlcnic_vf_info *vf = &adapter->ahw->sriov->vf_info[0]; in qlcnic_sriov_channel_cfg_cmd()
1501 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_vf_add_mc_list() local
1506 vf = &adapter->ahw->sriov->vf_info[0]; in qlcnic_vf_add_mc_list()
1512 for (i = 0; i < sriov->num_allowed_vlans; i++) { in qlcnic_vf_add_mc_list()
1664 struct qlcnic_back_channel *bc = &adapter->ahw->sriov->bc; in qlcnic_sriov_async_issue_cmd()
1949 static int qlcnic_sriov_check_vlan_id(struct qlcnic_sriov *sriov, in qlcnic_sriov_check_vlan_id() argument
1959 for (i = 0; i < sriov->num_allowed_vlans; i++) { in qlcnic_sriov_check_vlan_id()
1970 static int qlcnic_sriov_validate_num_vlans(struct qlcnic_sriov *sriov, in qlcnic_sriov_validate_num_vlans() argument
1977 if (vf->num_vlan >= sriov->num_allowed_vlans) in qlcnic_sriov_validate_num_vlans()
1987 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_validate_vlan_cfg() local
1993 vf = &adapter->ahw->sriov->vf_info[0]; in qlcnic_sriov_validate_vlan_cfg()
1995 if (sriov->vlan_mode != QLC_GUEST_VLAN_MODE) in qlcnic_sriov_validate_vlan_cfg()
2002 if (qlcnic_sriov_validate_num_vlans(sriov, vf)) in qlcnic_sriov_validate_vlan_cfg()
2005 if (sriov->any_vlan) { in qlcnic_sriov_validate_vlan_cfg()
2006 for (i = 0; i < sriov->num_allowed_vlans; i++) { in qlcnic_sriov_validate_vlan_cfg()
2007 if (sriov->allowed_vlans[i] == vid) in qlcnic_sriov_validate_vlan_cfg()
2015 if (!vlan_exist || qlcnic_sriov_check_vlan_id(sriov, vf, vid)) in qlcnic_sriov_validate_vlan_cfg()
2026 struct qlcnic_sriov *sriov; in qlcnic_sriov_vlan_operation() local
2028 sriov = adapter->ahw->sriov; in qlcnic_sriov_vlan_operation()
2037 qlcnic_sriov_add_vlan_id(sriov, vf, vlan_id); in qlcnic_sriov_vlan_operation()
2040 qlcnic_sriov_del_vlan_id(sriov, vf, vlan_id); in qlcnic_sriov_vlan_operation()
2053 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_cfg_vf_guest_vlan() local
2063 vf = &adapter->ahw->sriov->vf_info[0]; in qlcnic_sriov_cfg_vf_guest_vlan()
2075 qlcnic_sriov_cleanup_async_list(&sriov->bc); in qlcnic_sriov_cfg_vf_guest_vlan()
2162 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_alloc_vlans() local
2166 for (i = 0; i < sriov->num_vfs; i++) { in qlcnic_sriov_alloc_vlans()
2167 vf = &sriov->vf_info[i]; in qlcnic_sriov_alloc_vlans()
2168 vf->sriov_vlans = kcalloc(sriov->num_allowed_vlans, in qlcnic_sriov_alloc_vlans()
2179 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_free_vlans() local
2183 for (i = 0; i < sriov->num_vfs; i++) { in qlcnic_sriov_free_vlans()
2184 vf = &sriov->vf_info[i]; in qlcnic_sriov_free_vlans()
2190 void qlcnic_sriov_add_vlan_id(struct qlcnic_sriov *sriov, in qlcnic_sriov_add_vlan_id() argument
2195 for (i = 0; i < sriov->num_allowed_vlans; i++) { in qlcnic_sriov_add_vlan_id()
2204 void qlcnic_sriov_del_vlan_id(struct qlcnic_sriov *sriov, in qlcnic_sriov_del_vlan_id() argument
2209 for (i = 0; i < sriov->num_allowed_vlans; i++) { in qlcnic_sriov_del_vlan_id()