Lines Matching refs:nic_io

79 	struct hinic_func_to_io *nic_io = &hwdev->func_to_io;  in hinic_notify_all_vfs_link_changed()  local
82 nic_io->link_status = link_status; in hinic_notify_all_vfs_link_changed()
83 for (i = 1; i <= nic_io->max_vfs; i++) { in hinic_notify_all_vfs_link_changed()
84 if (!nic_io->vf_infos[HW_VF_ID_TO_OS(i)].link_forced) in hinic_notify_all_vfs_link_changed()
91 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_vf_info_vlanprio() local
95 pf_vlan = nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan; in hinic_vf_info_vlanprio()
96 pf_qos = nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos; in hinic_vf_info_vlanprio()
137 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_set_vf_tx_rate_max_min() local
157 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].max_rate = max_rate; in hinic_set_vf_tx_rate_max_min()
158 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].min_rate = min_rate; in hinic_set_vf_tx_rate_max_min()
167 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_set_vf_rate_limit() local
187 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].max_rate = tx_rate; in hinic_set_vf_rate_limit()
188 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].min_rate = 0; in hinic_set_vf_rate_limit()
263 struct hinic_func_to_io *nic_io; in hinic_register_vf_msg_handler() local
266 nic_io = &hw_dev->func_to_io; in hinic_register_vf_msg_handler()
267 if (vf_id > nic_io->max_vfs) { in hinic_register_vf_msg_handler()
269 HW_VF_ID_TO_OS(vf_id), HW_VF_ID_TO_OS(nic_io->max_vfs)); in hinic_register_vf_msg_handler()
281 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].registered = true; in hinic_register_vf_msg_handler()
291 struct hinic_func_to_io *nic_io; in hinic_unregister_vf_msg_handler() local
293 nic_io = &hw_dev->func_to_io; in hinic_unregister_vf_msg_handler()
295 if (vf_id > nic_io->max_vfs) in hinic_unregister_vf_msg_handler()
298 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].registered = false; in hinic_unregister_vf_msg_handler()
327 struct hinic_func_to_io *nic_io; in hinic_get_vf_mac_msg_handler() local
330 nic_io = &dev->func_to_io; in hinic_get_vf_mac_msg_handler()
331 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_get_vf_mac_msg_handler()
347 struct hinic_func_to_io *nic_io; in hinic_set_vf_mac_msg_handler() local
351 nic_io = &hw_dev->func_to_io; in hinic_set_vf_mac_msg_handler()
352 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_set_vf_mac_msg_handler()
381 struct hinic_func_to_io *nic_io; in hinic_del_vf_mac_msg_handler() local
385 nic_io = &hw_dev->func_to_io; in hinic_del_vf_mac_msg_handler()
386 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf_id); in hinic_del_vf_mac_msg_handler()
413 struct hinic_func_to_io *nic_io; in hinic_get_vf_link_status_msg_handler() local
416 nic_io = &hw_dev->func_to_io; in hinic_get_vf_link_status_msg_handler()
417 vf_infos = nic_io->vf_infos; in hinic_get_vf_link_status_msg_handler()
425 get_link->state = nic_io->link_status; in hinic_get_vf_link_status_msg_handler()
615 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_set_vf_mac() local
620 vf_info = nic_io->vf_infos + HW_VF_ID_TO_OS(vf); in hinic_set_vf_mac()
665 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_add_vf_vlan() local
672 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan = vlan; in hinic_add_vf_vlan()
673 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos = qos; in hinic_add_vf_vlan()
682 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_kill_vf_vlan() local
686 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan, in hinic_kill_vf_vlan()
687 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos, in hinic_kill_vf_vlan()
693 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan, in hinic_kill_vf_vlan()
696 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_vlan = 0; in hinic_kill_vf_vlan()
697 nic_io->vf_infos[HW_VF_ID_TO_OS(vf_id)].pf_qos = 0; in hinic_kill_vf_vlan()
814 struct hinic_func_to_io *nic_io; in hinic_set_vf_trust() local
819 nic_io = &hwdev->func_to_io; in hinic_set_vf_trust()
820 vf_infos = nic_io->vf_infos; in hinic_set_vf_trust()
830 struct hinic_func_to_io *nic_io; in hinic_ndo_set_vf_trust() local
835 nic_io = &adapter->hwdev->func_to_io; in hinic_ndo_set_vf_trust()
840 cur_trust = nic_io->vf_infos[vf].trust; in hinic_ndo_set_vf_trust()
982 struct hinic_func_to_io *nic_io = &hwdev->func_to_io; in hinic_set_vf_link_state() local
983 struct vf_data_storage *vf_infos = nic_io->vf_infos; in hinic_set_vf_link_state()
989 vf_infos[HW_VF_ID_TO_OS(vf_id)].link_up = nic_io->link_status ? in hinic_set_vf_link_state()
991 link_status = nic_io->link_status; in hinic_set_vf_link_state()
1037 struct hinic_func_to_io *nic_io; in nic_pf_mbox_handler() local
1054 nic_io = &dev->func_to_io; in nic_pf_mbox_handler()
1072 dev_err(&nic_io->hwif->pdev->dev, "PF receive VF L2NIC cmd: %d process error, err:%d\n", in nic_pf_mbox_handler()
1097 static int hinic_init_vf_infos(struct hinic_func_to_io *nic_io, u16 vf_id) in hinic_init_vf_infos() argument
1099 struct vf_data_storage *vf_infos = nic_io->vf_infos; in hinic_init_vf_infos()
1102 …dev_warn(&nic_io->hwif->pdev->dev, "Module Parameter set_vf_link_state value %d is out of range, r… in hinic_init_vf_infos()
1120 dev_err(&nic_io->hwif->pdev->dev, "Invalid input parameter set_vf_link_state: %d\n", in hinic_init_vf_infos()
1173 struct hinic_func_to_io *nic_io; in hinic_vf_func_init() local
1184 nic_io = &hwdev->func_to_io; in hinic_vf_func_init()
1205 nic_io->max_vfs = hwdev->nic_cap.max_vf; in hinic_vf_func_init()
1206 size = sizeof(*nic_io->vf_infos) * nic_io->max_vfs; in hinic_vf_func_init()
1208 nic_io->vf_infos = kzalloc(size, GFP_KERNEL); in hinic_vf_func_init()
1209 if (!nic_io->vf_infos) { in hinic_vf_func_init()
1214 for (i = 0; i < nic_io->max_vfs; i++) { in hinic_vf_func_init()
1215 err = hinic_init_vf_infos(nic_io, i); in hinic_vf_func_init()
1231 kfree(nic_io->vf_infos); in hinic_vf_func_init()