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()
104 * @pf: PF device pointer
108 void i40e_notify_client_of_l2_param_changes(struct i40e_pf *pf) in i40e_notify_client_of_l2_param_changes() argument
110 struct i40e_vsi *vsi = i40e_pf_get_main_vsi(pf); in i40e_notify_client_of_l2_param_changes()
111 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_l2_param_changes()
117 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_l2_param_changes()
122 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_l2_param_changes()
147 struct i40e_pf *pf = ldev->pf; in i40e_client_release_qvlist() local
153 wr32(&pf->hw, reg_idx, I40E_PFINT_LNKLSTN_FIRSTQ_INDX_MASK); in i40e_client_release_qvlist()
161 * @pf: PF device pointer
166 void i40e_notify_client_of_netdev_close(struct i40e_pf *pf, bool reset) in i40e_notify_client_of_netdev_close() argument
168 struct i40e_client_instance *cdev = pf->cinst; in i40e_notify_client_of_netdev_close()
173 dev_dbg(&pf->pdev->dev, in i40e_notify_client_of_netdev_close()
178 dev_dbg(&pf->pdev->dev, "Client is not open, abort close\n"); 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()
331 * @pf: pointer to the board struct
334 static void i40e_client_add_instance(struct i40e_pf *pf) in i40e_client_add_instance() argument
336 struct i40e_vsi *vsi = i40e_pf_get_main_vsi(pf); in i40e_client_add_instance()
344 cdev->lan_info.pf = (void *)pf; in i40e_client_add_instance()
346 cdev->lan_info.pcidev = pf->pdev; in i40e_client_add_instance()
347 cdev->lan_info.fid = pf->hw.pf_id; in i40e_client_add_instance()
349 cdev->lan_info.hw_addr = pf->hw.hw_addr; in i40e_client_add_instance()
354 cdev->lan_info.fw_maj_ver = pf->hw.aq.fw_maj_ver; in i40e_client_add_instance()
355 cdev->lan_info.fw_min_ver = pf->hw.aq.fw_min_ver; in i40e_client_add_instance()
356 cdev->lan_info.fw_build = pf->hw.aq.fw_build; in i40e_client_add_instance()
367 dev_err(&pf->pdev->dev, "MAC address list is empty!\n"); in i40e_client_add_instance()
369 pf->cinst = cdev; in i40e_client_add_instance()
371 cdev->lan_info.msix_count = pf->num_iwarp_msix; in i40e_client_add_instance()
372 cdev->lan_info.msix_entries = &pf->msix_entries[pf->iwarp_base_vector]; in i40e_client_add_instance()
381 pf->cinst = NULL; in i40e_client_add_instance()
386 * @pf: pointer to the board struct
390 void i40e_client_del_instance(struct i40e_pf *pf) in i40e_client_del_instance() argument
392 kfree(pf->cinst); in i40e_client_del_instance()
393 pf->cinst = NULL; in i40e_client_del_instance()
398 * @pf: board private structure
400 void i40e_client_subtask(struct i40e_pf *pf) in i40e_client_subtask() argument
402 struct i40e_vsi *vsi = i40e_pf_get_main_vsi(pf); in i40e_client_subtask()
407 if (!test_and_clear_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state)) in i40e_client_subtask()
409 cdev = pf->cinst; in i40e_client_subtask()
412 if (test_bit(__I40E_DOWN, pf->state) || in i40e_client_subtask()
413 test_bit(__I40E_CONFIG_BUSY, pf->state)) in i40e_client_subtask()
453 * @pf: pointer to the board struct
457 int i40e_lan_add_device(struct i40e_pf *pf) in i40e_lan_add_device() argument
464 if (ldev->pf == pf) { in i40e_lan_add_device()
474 ldev->pf = pf; in i40e_lan_add_device()
477 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()
478 pf->hw.pf_id, pf->hw.bus.bus_id, in i40e_lan_add_device()
479 pf->hw.bus.device, pf->hw.bus.func); in i40e_lan_add_device()
481 i40e_client_add_instance(pf); in i40e_lan_add_device()
483 set_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state); in i40e_lan_add_device()
484 i40e_service_event_schedule(pf); in i40e_lan_add_device()
493 * @pf: pointer to the board struct
497 int i40e_lan_del_device(struct i40e_pf *pf) in i40e_lan_del_device() argument
499 struct auxiliary_device *aux_dev = pf->cinst->lan_info.aux_dev; in i40e_lan_del_device()
507 i40e_client_del_instance(pf); in i40e_lan_del_device()
511 if (ldev->pf == pf) { in i40e_lan_del_device()
512 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()
513 pf->hw.pf_id, pf->hw.bus.bus_id, in i40e_lan_del_device()
514 pf->hw.bus.device, pf->hw.bus.func); in i40e_lan_del_device()
539 struct i40e_pf *pf = ldev->pf; in i40e_client_virtchnl_send() local
540 struct i40e_hw *hw = &pf->hw; in i40e_client_virtchnl_send()
546 dev_err(&pf->pdev->dev, "Unable to send iWarp message to VF, error %d, aq status %d\n", in i40e_client_virtchnl_send()
564 struct i40e_pf *pf = ldev->pf; in i40e_client_setup_qvlist() local
565 struct i40e_hw *hw = &pf->hw; in i40e_client_setup_qvlist()
580 if ((v_idx >= (pf->iwarp_base_vector + pf->num_iwarp_msix)) || in i40e_client_setup_qvlist()
581 (v_idx < pf->iwarp_base_vector)) in i40e_client_setup_qvlist()
633 struct i40e_pf *pf = ldev->pf; in i40e_client_request_reset() local
637 set_bit(__I40E_PF_RESET_REQUESTED, pf->state); in i40e_client_request_reset()
640 set_bit(__I40E_PF_RESET_REQUESTED, pf->state); in i40e_client_request_reset()
643 dev_warn(&pf->pdev->dev, in i40e_client_request_reset()
644 "Client for PF id %d requested an unsupported reset: %d.\n", in i40e_client_request_reset()
645 pf->hw.pf_id, reset_level); in i40e_client_request_reset()
649 i40e_service_event_schedule(pf); in i40e_client_request_reset()
668 struct i40e_vsi *vsi = i40e_pf_get_main_vsi(ldev->pf); in i40e_client_update_vsi_ctxt()
669 struct i40e_pf *pf = ldev->pf; in i40e_client_update_vsi_ctxt() local
678 ctxt.seid = pf->main_vsi_seid; in i40e_client_update_vsi_ctxt()
679 ctxt.pf_num = pf->hw.pf_id; in i40e_client_update_vsi_ctxt()
680 err = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); in i40e_client_update_vsi_ctxt()
683 dev_info(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
684 "couldn't get PF vsi config, err %pe aq_err %s\n", in i40e_client_update_vsi_ctxt()
686 i40e_aq_str(&pf->hw, in i40e_client_update_vsi_ctxt()
687 pf->hw.aq.asq_last_status)); in i40e_client_update_vsi_ctxt()
703 dev_warn(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
704 "Client for PF id %d request an unsupported Config: %x.\n", in i40e_client_update_vsi_ctxt()
705 pf->hw.pf_id, flag); in i40e_client_update_vsi_ctxt()
711 dev_info(&pf->pdev->dev, in i40e_client_update_vsi_ctxt()
714 i40e_aq_str(&pf->hw, in i40e_client_update_vsi_ctxt()
715 pf->hw.aq.asq_last_status)); in i40e_client_update_vsi_ctxt()
723 struct i40e_pf *pf = ldev->pf; in i40e_client_device_register() local
725 pf->cinst->client = client; in i40e_client_device_register()
726 set_bit(__I40E_CLIENT_SERVICE_REQUESTED, pf->state); in i40e_client_device_register()
727 i40e_service_event_schedule(pf); in i40e_client_device_register()
733 struct i40e_pf *pf = ldev->pf; in i40e_client_device_unregister() local
734 struct i40e_client_instance *cdev = pf->cinst; in i40e_client_device_unregister()
739 while (test_and_set_bit(__I40E_SERVICE_SCHED, pf->state)) in i40e_client_device_unregister()
748 pf->cinst->client = NULL; in i40e_client_device_unregister()
749 clear_bit(__I40E_SERVICE_SCHED, pf->state); in i40e_client_device_unregister()