Lines Matching full:pf
86 struct i40e_pf *pf = vsi->back; in i40e_notify_client_of_vf_msg() local
87 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_vf_msg()
92 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_vf_msg()
97 dev_dbg(&pf->pdev->dev, "Client is not open, abort virtchnl_receive\n"); in i40e_notify_client_of_vf_msg()
112 struct i40e_pf *pf = vsi->back; in i40e_notify_client_of_l2_param_changes() local
113 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_l2_param_changes()
148 struct i40e_pf *pf = ldev->pf; in i40e_client_release_qvlist() local
156 wr32(&pf->hw, reg_idx, I40E_PFINT_LNKLSTN_FIRSTQ_INDX_MASK); in i40e_client_release_qvlist()
171 struct i40e_pf *pf = vsi->back; in i40e_notify_client_of_netdev_close() local
172 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_netdev_close()
188 * @pf: PF device pointer
191 * If there is a client attached to this PF, notify when a VF is reset
193 void i40e_notify_client_of_vf_reset(struct i40e_pf *pf, u32 vf_id) in i40e_notify_client_of_vf_reset() argument
195 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_vf_reset()
200 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_vf_reset()
205 dev_dbg(&pf->pdev->dev, "Client is not open, abort vf-reset\n"); in i40e_notify_client_of_vf_reset()
213 * @pf: PF device pointer
216 * If there is a client attached to this PF, call its VF notification routine
218 void i40e_notify_client_of_vf_enable(struct i40e_pf *pf, u32 num_vfs) in i40e_notify_client_of_vf_enable() argument
220 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_vf_enable()
225 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_vf_enable()
231 dev_dbg(&pf->pdev->dev, "Client is not open, abort vf-enable\n"); in i40e_notify_client_of_vf_enable()
239 * @pf: PF device pointer
242 * If there is a client of the specified type attached to this PF, call
245 int i40e_vf_client_capable(struct i40e_pf *pf, u32 vf_id) in i40e_vf_client_capable() argument
247 struct i40e_client_instance *cdev = pf->cinst; in i40e_vf_client_capable()
253 dev_dbg(&pf->pdev->dev, in i40e_vf_client_capable()
267 void i40e_client_update_msix_info(struct i40e_pf *pf) in i40e_client_update_msix_info() argument
269 struct i40e_client_instance *cdev = pf->cinst; in i40e_client_update_msix_info()
274 cdev->lan_info.msix_count = pf->num_iwarp_msix; in i40e_client_update_msix_info()
275 cdev->lan_info.msix_entries = &pf->msix_entries[pf->iwarp_base_vector]; in i40e_client_update_msix_info()
280 * @pf: pointer to the board struct
283 static void i40e_client_add_instance(struct i40e_pf *pf) in i40e_client_add_instance() argument
287 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_client_add_instance()
289 if (!registered_client || pf->cinst) in i40e_client_add_instance()
296 cdev->lan_info.pf = (void *)pf; in i40e_client_add_instance()
298 cdev->lan_info.pcidev = pf->pdev; in i40e_client_add_instance()
299 cdev->lan_info.fid = pf->hw.pf_id; in i40e_client_add_instance()
301 cdev->lan_info.hw_addr = pf->hw.hw_addr; in i40e_client_add_instance()
306 cdev->lan_info.fw_maj_ver = pf->hw.aq.fw_maj_ver; in i40e_client_add_instance()
307 cdev->lan_info.fw_min_ver = pf->hw.aq.fw_min_ver; in i40e_client_add_instance()
308 cdev->lan_info.fw_build = pf->hw.aq.fw_build; in i40e_client_add_instance()
322 dev_err(&pf->pdev->dev, "MAC address list is empty!\n"); in i40e_client_add_instance()
325 pf->cinst = cdev; in i40e_client_add_instance()
327 i40e_client_update_msix_info(pf); in i40e_client_add_instance()
332 * @pf: pointer to the board struct
336 void i40e_client_del_instance(struct i40e_pf *pf) in i40e_client_del_instance() argument
338 kfree(pf->cinst); in i40e_client_del_instance()
339 pf->cinst = NULL; in i40e_client_del_instance()
344 * @pf: board private structure
346 void i40e_client_subtask(struct i40e_pf *pf) in i40e_client_subtask() argument
350 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_client_subtask()
353 if (!test_and_clear_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state)) in i40e_client_subtask()
355 cdev = pf->cinst; in i40e_client_subtask()
358 if (test_bit(__I40E_DOWN, pf->state) || in i40e_client_subtask()
359 test_bit(__I40E_CONFIG_BUSY, pf->state)) in i40e_client_subtask()
377 i40e_client_del_instance(pf); in i40e_client_subtask()
397 * @pf: pointer to the board struct
401 int i40e_lan_add_device(struct i40e_pf *pf) in i40e_lan_add_device() argument
408 if (ldev->pf == pf) { in i40e_lan_add_device()
418 ldev->pf = pf; in i40e_lan_add_device()
421 dev_info(&pf->pdev->dev, "Added LAN device PF%d bus=0x%02x dev=0x%02x func=0x%02x\n", in i40e_lan_add_device()
422 pf->hw.pf_id, pf->hw.bus.bus_id, in i40e_lan_add_device()
423 pf->hw.bus.device, pf->hw.bus.func); in i40e_lan_add_device()
429 i40e_client_add_instance(pf); in i40e_lan_add_device()
435 set_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state); in i40e_lan_add_device()
436 i40e_service_event_schedule(pf); in i40e_lan_add_device()
445 * @pf: pointer to the board struct
449 int i40e_lan_del_device(struct i40e_pf *pf) in i40e_lan_del_device() argument
455 i40e_client_del_instance(pf); in i40e_lan_del_device()
459 if (ldev->pf == pf) { in i40e_lan_del_device()
460 dev_info(&pf->pdev->dev, "Deleted LAN device PF%d bus=0x%02x dev=0x%02x func=0x%02x\n", in i40e_lan_del_device()
461 pf->hw.pf_id, pf->hw.bus.bus_id, in i40e_lan_del_device()
462 pf->hw.bus.device, pf->hw.bus.func); in i40e_lan_del_device()
482 struct i40e_pf *pf; in i40e_client_release() local
486 pf = ldev->pf; in i40e_client_release()
487 cdev = pf->cinst; in i40e_client_release()
492 pf->state)) in i40e_client_release()
502 dev_warn(&pf->pdev->dev, in i40e_client_release()
503 "Client %s instance for PF id %d closed\n", in i40e_client_release()
504 client->name, pf->hw.pf_id); in i40e_client_release()
507 i40e_client_del_instance(pf); in i40e_client_release()
508 dev_info(&pf->pdev->dev, "Deleted client instance of Client %s\n", in i40e_client_release()
510 clear_bit(__I40E_SERVICE_SCHED, pf->state); in i40e_client_release()
523 struct i40e_pf *pf; in i40e_client_prepare() local
527 pf = ldev->pf; in i40e_client_prepare()
528 i40e_client_add_instance(pf); in i40e_client_prepare()
530 set_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state); in i40e_client_prepare()
531 i40e_service_event_schedule(pf); in i40e_client_prepare()
550 struct i40e_pf *pf = ldev->pf; in i40e_client_virtchnl_send() local
551 struct i40e_hw *hw = &pf->hw; in i40e_client_virtchnl_send()
557 dev_err(&pf->pdev->dev, "Unable to send iWarp message to VF, error %d, aq status %d\n", in i40e_client_virtchnl_send()
575 struct i40e_pf *pf = ldev->pf; in i40e_client_setup_qvlist() local
576 struct i40e_hw *hw = &pf->hw; in i40e_client_setup_qvlist()
593 if ((v_idx >= (pf->iwarp_base_vector + pf->num_iwarp_msix)) || in i40e_client_setup_qvlist()
594 (v_idx < pf->iwarp_base_vector)) in i40e_client_setup_qvlist()
646 struct i40e_pf *pf = ldev->pf; in i40e_client_request_reset() local
650 set_bit(__I40E_PF_RESET_REQUESTED, pf->state); in i40e_client_request_reset()
653 set_bit(__I40E_PF_RESET_REQUESTED, pf->state); in i40e_client_request_reset()
656 dev_warn(&pf->pdev->dev, in i40e_client_request_reset()
657 "Client for PF id %d requested an unsupported reset: %d.\n", in i40e_client_request_reset()
658 pf->hw.pf_id, reset_level); in i40e_client_request_reset()
662 i40e_service_event_schedule(pf); in i40e_client_request_reset()
681 struct i40e_pf *pf = ldev->pf; in i40e_client_update_vsi_ctxt() local
682 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_client_update_vsi_ctxt()
691 ctxt.seid = pf->main_vsi_seid; in i40e_client_update_vsi_ctxt()
692 ctxt.pf_num = pf->hw.pf_id; in i40e_client_update_vsi_ctxt()
693 err = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); in i40e_client_update_vsi_ctxt()
696 dev_info(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
697 "couldn't get PF vsi config, err %s aq_err %s\n", in i40e_client_update_vsi_ctxt()
698 i40e_stat_str(&pf->hw, err), in i40e_client_update_vsi_ctxt()
699 i40e_aq_str(&pf->hw, in i40e_client_update_vsi_ctxt()
700 pf->hw.aq.asq_last_status)); in i40e_client_update_vsi_ctxt()
716 dev_warn(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
717 "Client for PF id %d request an unsupported Config: %x.\n", in i40e_client_update_vsi_ctxt()
718 pf->hw.pf_id, flag); in i40e_client_update_vsi_ctxt()
724 dev_info(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
726 i40e_stat_str(&pf->hw, err), in i40e_client_update_vsi_ctxt()
727 i40e_aq_str(&pf->hw, in i40e_client_update_vsi_ctxt()
728 pf->hw.aq.asq_last_status)); in i40e_client_update_vsi_ctxt()