Lines Matching full:pf

11  * @pf: pointer to PF struct
14 * pf->adev.dev to avoid race conditions.
16 static struct iidc_auxiliary_drv *ice_get_auxiliary_drv(struct ice_pf *pf) in ice_get_auxiliary_drv() argument
20 adev = pf->adev; in ice_get_auxiliary_drv()
30 * @pf: pointer to PF struct
33 void ice_send_event_to_aux(struct ice_pf *pf, struct iidc_event *event) in ice_send_event_to_aux() argument
40 mutex_lock(&pf->adev_mutex); in ice_send_event_to_aux()
41 if (!pf->adev) in ice_send_event_to_aux()
44 device_lock(&pf->adev->dev); in ice_send_event_to_aux()
45 iadrv = ice_get_auxiliary_drv(pf); in ice_send_event_to_aux()
47 iadrv->event_handler(pf, event); in ice_send_event_to_aux()
48 device_unlock(&pf->adev->dev); in ice_send_event_to_aux()
50 mutex_unlock(&pf->adev_mutex); in ice_send_event_to_aux()
55 * @pf: PF struct
58 int ice_add_rdma_qset(struct ice_pf *pf, struct iidc_rdma_qset_params *qset) in ice_add_rdma_qset() argument
68 if (WARN_ON(!pf || !qset)) in ice_add_rdma_qset()
71 dev = ice_pf_to_dev(pf); in ice_add_rdma_qset()
73 if (!ice_is_rdma_ena(pf)) in ice_add_rdma_qset()
76 vsi = ice_get_main_vsi(pf); in ice_add_rdma_qset()
110 * @pf: PF struct
113 int ice_del_rdma_qset(struct ice_pf *pf, struct iidc_rdma_qset_params *qset) in ice_del_rdma_qset() argument
119 if (WARN_ON(!pf || !qset)) in ice_del_rdma_qset()
122 vsi = ice_find_vsi(pf, qset->vport_id); in ice_del_rdma_qset()
124 dev_err(ice_pf_to_dev(pf), "RDMA Invalid VSI\n"); in ice_del_rdma_qset()
139 * @pf: struct for PF
142 int ice_rdma_request_reset(struct ice_pf *pf, enum iidc_reset_type reset_type) in ice_rdma_request_reset() argument
146 if (WARN_ON(!pf)) in ice_rdma_request_reset()
160 dev_err(ice_pf_to_dev(pf), "incorrect reset request\n"); in ice_rdma_request_reset()
164 return ice_schedule_reset(pf, reset); in ice_rdma_request_reset()
170 * @pf: pointer to struct for PF
174 int ice_rdma_update_vsi_filter(struct ice_pf *pf, u16 vsi_id, bool enable) in ice_rdma_update_vsi_filter() argument
179 if (WARN_ON(!pf)) in ice_rdma_update_vsi_filter()
182 vsi = ice_find_vsi(pf, vsi_id); in ice_rdma_update_vsi_filter()
186 status = ice_cfg_rdma_fltr(&pf->hw, vsi->idx, enable); in ice_rdma_update_vsi_filter()
188 dev_err(ice_pf_to_dev(pf), "Failed to %sable RDMA filtering\n", in ice_rdma_update_vsi_filter()
203 * @pf: pointer to PF struct
206 void ice_get_qos_params(struct ice_pf *pf, struct iidc_qos_params *qos) in ice_get_qos_params() argument
212 dcbx_cfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; in ice_get_qos_params()
213 up2tc = rd32(&pf->hw, PRTDCB_TUP2TC); in ice_get_qos_params()
231 * @pf: board private structure to initialize
233 static int ice_reserve_rdma_qvector(struct ice_pf *pf) in ice_reserve_rdma_qvector() argument
235 if (ice_is_rdma_ena(pf)) { in ice_reserve_rdma_qvector()
238 index = ice_get_res(pf, pf->irq_tracker, pf->num_rdma_msix, in ice_reserve_rdma_qvector()
242 pf->num_avail_sw_msix -= pf->num_rdma_msix; in ice_reserve_rdma_qvector()
243 pf->rdma_base_vector = (u16)index; in ice_reserve_rdma_qvector()
262 * @pf: pointer to pf struct
264 int ice_plug_aux_dev(struct ice_pf *pf) in ice_plug_aux_dev() argument
270 /* if this PF doesn't support a technology that requires auxiliary in ice_plug_aux_dev()
273 if (!ice_is_rdma_ena(pf)) in ice_plug_aux_dev()
281 iadev->pf = pf; in ice_plug_aux_dev()
283 adev->id = pf->aux_idx; in ice_plug_aux_dev()
285 adev->dev.parent = &pf->pdev->dev; in ice_plug_aux_dev()
286 adev->name = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ? "roce" : "iwarp"; in ice_plug_aux_dev()
300 mutex_lock(&pf->adev_mutex); in ice_plug_aux_dev()
301 pf->adev = adev; in ice_plug_aux_dev()
302 mutex_unlock(&pf->adev_mutex); in ice_plug_aux_dev()
308 * @pf: pointer to pf struct
310 void ice_unplug_aux_dev(struct ice_pf *pf) in ice_unplug_aux_dev() argument
314 mutex_lock(&pf->adev_mutex); in ice_unplug_aux_dev()
315 adev = pf->adev; in ice_unplug_aux_dev()
316 pf->adev = NULL; in ice_unplug_aux_dev()
317 mutex_unlock(&pf->adev_mutex); in ice_unplug_aux_dev()
326 * ice_init_rdma - initializes PF for RDMA use
327 * @pf: ptr to ice_pf
329 int ice_init_rdma(struct ice_pf *pf) in ice_init_rdma() argument
331 struct device *dev = &pf->pdev->dev; in ice_init_rdma()
335 ret = ice_reserve_rdma_qvector(pf); in ice_init_rdma()
340 pf->rdma_mode |= IIDC_RDMA_PROTOCOL_ROCEV2; in ice_init_rdma()
341 return ice_plug_aux_dev(pf); in ice_init_rdma()