Lines Matching full:pf
84 struct i40e_pf *pf = vsi->back; in i40e_notify_client_of_vf_msg() local
85 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_vf_msg()
90 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_vf_msg()
95 dev_dbg(&pf->pdev->dev, "Client is not open, abort virtchnl_receive\n"); in i40e_notify_client_of_vf_msg()
110 struct i40e_pf *pf = vsi->back; in i40e_notify_client_of_l2_param_changes() local
111 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_l2_param_changes()
146 struct i40e_pf *pf = ldev->pf; in i40e_client_release_qvlist() local
154 wr32(&pf->hw, reg_idx, I40E_PFINT_LNKLSTN_FIRSTQ_INDX_MASK); in i40e_client_release_qvlist()
169 struct i40e_pf *pf = vsi->back; in i40e_notify_client_of_netdev_close() local
170 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_netdev_close()
180 dev_dbg(&pf->pdev->dev, "Client is not open, abort close\n"); in i40e_notify_client_of_netdev_close()
190 * @pf: PF device pointer
193 * If there is a client attached to this PF, notify when a VF is reset
195 void i40e_notify_client_of_vf_reset(struct i40e_pf *pf, u32 vf_id) in i40e_notify_client_of_vf_reset() argument
197 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_vf_reset()
202 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_vf_reset()
207 dev_dbg(&pf->pdev->dev, "Client is not open, abort vf-reset\n"); in i40e_notify_client_of_vf_reset()
215 * @pf: PF device pointer
218 * If there is a client attached to this PF, call its VF notification routine
220 void i40e_notify_client_of_vf_enable(struct i40e_pf *pf, u32 num_vfs) in i40e_notify_client_of_vf_enable() argument
222 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_vf_enable()
227 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_vf_enable()
233 dev_dbg(&pf->pdev->dev, "Client is not open, abort vf-enable\n"); in i40e_notify_client_of_vf_enable()
241 * @pf: PF device pointer
244 * If there is a client of the specified type attached to this PF, call
247 int i40e_vf_client_capable(struct i40e_pf *pf, u32 vf_id) in i40e_vf_client_capable() argument
249 struct i40e_client_instance *cdev = pf->cinst; in i40e_vf_client_capable()
255 dev_dbg(&pf->pdev->dev, in i40e_vf_client_capable()
269 void i40e_client_update_msix_info(struct i40e_pf *pf) in i40e_client_update_msix_info() argument
271 struct i40e_client_instance *cdev = pf->cinst; in i40e_client_update_msix_info()
276 cdev->lan_info.msix_count = pf->num_iwarp_msix; in i40e_client_update_msix_info()
277 cdev->lan_info.msix_entries = &pf->msix_entries[pf->iwarp_base_vector]; in i40e_client_update_msix_info()
333 * @pf: pointer to the board struct
336 static void i40e_client_add_instance(struct i40e_pf *pf) in i40e_client_add_instance() argument
340 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_client_add_instance()
346 cdev->lan_info.pf = (void *)pf; in i40e_client_add_instance()
348 cdev->lan_info.pcidev = pf->pdev; in i40e_client_add_instance()
349 cdev->lan_info.fid = pf->hw.pf_id; in i40e_client_add_instance()
351 cdev->lan_info.hw_addr = pf->hw.hw_addr; in i40e_client_add_instance()
356 cdev->lan_info.fw_maj_ver = pf->hw.aq.fw_maj_ver; in i40e_client_add_instance()
357 cdev->lan_info.fw_min_ver = pf->hw.aq.fw_min_ver; in i40e_client_add_instance()
358 cdev->lan_info.fw_build = pf->hw.aq.fw_build; in i40e_client_add_instance()
369 dev_err(&pf->pdev->dev, "MAC address list is empty!\n"); in i40e_client_add_instance()
371 pf->cinst = cdev; in i40e_client_add_instance()
373 cdev->lan_info.msix_count = pf->num_iwarp_msix; in i40e_client_add_instance()
374 cdev->lan_info.msix_entries = &pf->msix_entries[pf->iwarp_base_vector]; in i40e_client_add_instance()
383 pf->cinst = NULL; in i40e_client_add_instance()
388 * @pf: pointer to the board struct
392 void i40e_client_del_instance(struct i40e_pf *pf) in i40e_client_del_instance() argument
394 kfree(pf->cinst); in i40e_client_del_instance()
395 pf->cinst = NULL; in i40e_client_del_instance()
400 * @pf: board private structure
402 void i40e_client_subtask(struct i40e_pf *pf) in i40e_client_subtask() argument
406 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_client_subtask()
409 if (!test_and_clear_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state)) in i40e_client_subtask()
411 cdev = pf->cinst; in i40e_client_subtask()
414 if (test_bit(__I40E_DOWN, pf->state) || in i40e_client_subtask()
415 test_bit(__I40E_CONFIG_BUSY, pf->state)) in i40e_client_subtask()
455 * @pf: pointer to the board struct
459 int i40e_lan_add_device(struct i40e_pf *pf) in i40e_lan_add_device() argument
466 if (ldev->pf == pf) { in i40e_lan_add_device()
476 ldev->pf = pf; in i40e_lan_add_device()
479 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()
480 pf->hw.pf_id, pf->hw.bus.bus_id, in i40e_lan_add_device()
481 pf->hw.bus.device, pf->hw.bus.func); in i40e_lan_add_device()
483 i40e_client_add_instance(pf); in i40e_lan_add_device()
485 set_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state); in i40e_lan_add_device()
486 i40e_service_event_schedule(pf); in i40e_lan_add_device()
495 * @pf: pointer to the board struct
499 int i40e_lan_del_device(struct i40e_pf *pf) in i40e_lan_del_device() argument
501 struct auxiliary_device *aux_dev = pf->cinst->lan_info.aux_dev; in i40e_lan_del_device()
509 i40e_client_del_instance(pf); in i40e_lan_del_device()
513 if (ldev->pf == pf) { in i40e_lan_del_device()
514 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()
515 pf->hw.pf_id, pf->hw.bus.bus_id, in i40e_lan_del_device()
516 pf->hw.bus.device, pf->hw.bus.func); in i40e_lan_del_device()
541 struct i40e_pf *pf = ldev->pf; in i40e_client_virtchnl_send() local
542 struct i40e_hw *hw = &pf->hw; in i40e_client_virtchnl_send()
548 dev_err(&pf->pdev->dev, "Unable to send iWarp message to VF, error %d, aq status %d\n", in i40e_client_virtchnl_send()
566 struct i40e_pf *pf = ldev->pf; in i40e_client_setup_qvlist() local
567 struct i40e_hw *hw = &pf->hw; in i40e_client_setup_qvlist()
584 if ((v_idx >= (pf->iwarp_base_vector + pf->num_iwarp_msix)) || in i40e_client_setup_qvlist()
585 (v_idx < pf->iwarp_base_vector)) in i40e_client_setup_qvlist()
637 struct i40e_pf *pf = ldev->pf; in i40e_client_request_reset() local
641 set_bit(__I40E_PF_RESET_REQUESTED, pf->state); in i40e_client_request_reset()
644 set_bit(__I40E_PF_RESET_REQUESTED, pf->state); in i40e_client_request_reset()
647 dev_warn(&pf->pdev->dev, in i40e_client_request_reset()
648 "Client for PF id %d requested an unsupported reset: %d.\n", in i40e_client_request_reset()
649 pf->hw.pf_id, reset_level); in i40e_client_request_reset()
653 i40e_service_event_schedule(pf); in i40e_client_request_reset()
672 struct i40e_pf *pf = ldev->pf; in i40e_client_update_vsi_ctxt() local
673 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_client_update_vsi_ctxt()
682 ctxt.seid = pf->main_vsi_seid; in i40e_client_update_vsi_ctxt()
683 ctxt.pf_num = pf->hw.pf_id; in i40e_client_update_vsi_ctxt()
684 err = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); in i40e_client_update_vsi_ctxt()
687 dev_info(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
688 "couldn't get PF vsi config, err %pe aq_err %s\n", in i40e_client_update_vsi_ctxt()
690 i40e_aq_str(&pf->hw, in i40e_client_update_vsi_ctxt()
691 pf->hw.aq.asq_last_status)); in i40e_client_update_vsi_ctxt()
707 dev_warn(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
708 "Client for PF id %d request an unsupported Config: %x.\n", in i40e_client_update_vsi_ctxt()
709 pf->hw.pf_id, flag); in i40e_client_update_vsi_ctxt()
715 dev_info(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
718 i40e_aq_str(&pf->hw, in i40e_client_update_vsi_ctxt()
719 pf->hw.aq.asq_last_status)); in i40e_client_update_vsi_ctxt()
727 struct i40e_pf *pf = ldev->pf; in i40e_client_device_register() local
729 pf->cinst->client = client; in i40e_client_device_register()
730 set_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state); in i40e_client_device_register()
731 i40e_service_event_schedule(pf); in i40e_client_device_register()
737 struct i40e_pf *pf = ldev->pf; in i40e_client_device_unregister() local
738 struct i40e_client_instance *cdev = pf->cinst; in i40e_client_device_unregister()
743 while (test_and_set_bit(__I40E_SERVICE_SCHED, pf->state)) in i40e_client_device_unregister()
752 pf->cinst->client = NULL; in i40e_client_device_unregister()
753 clear_bit(__I40E_SERVICE_SCHED, pf->state); in i40e_client_device_unregister()