Lines Matching refs:vf
23 struct ifcvf_hw *vf = arg; in ifcvf_config_changed() local
25 if (vf->config_cb.callback) in ifcvf_config_changed()
26 return vf->config_cb.callback(vf->config_cb.private); in ifcvf_config_changed()
49 struct ifcvf_hw *vf = &adapter->vf; in ifcvf_free_irq() local
54 devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); in ifcvf_free_irq()
55 vf->vring[i].irq = -EINVAL; in ifcvf_free_irq()
58 devm_free_irq(&pdev->dev, vf->config_irq, vf); in ifcvf_free_irq()
65 struct ifcvf_hw *vf = &adapter->vf; in ifcvf_request_irq() local
75 snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n", in ifcvf_request_irq()
78 vf->config_irq = pci_irq_vector(pdev, vector); in ifcvf_request_irq()
79 ret = devm_request_irq(&pdev->dev, vf->config_irq, in ifcvf_request_irq()
81 vf->config_msix_name, vf); in ifcvf_request_irq()
88 snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n", in ifcvf_request_irq()
94 vf->vring[i].msix_name, in ifcvf_request_irq()
95 &vf->vring[i]); in ifcvf_request_irq()
104 vf->vring[i].irq = irq; in ifcvf_request_irq()
112 struct ifcvf_hw *vf = ifcvf_private_to_vf(private); in ifcvf_start_datapath() local
116 vf->nr_vring = IFCVF_MAX_QUEUE_PAIRS * 2; in ifcvf_start_datapath()
117 ret = ifcvf_start_hw(vf); in ifcvf_start_datapath()
119 status = ifcvf_get_status(vf); in ifcvf_start_datapath()
121 ifcvf_set_status(vf, status); in ifcvf_start_datapath()
129 struct ifcvf_hw *vf = ifcvf_private_to_vf(private); in ifcvf_stop_datapath() local
133 vf->vring[i].cb.callback = NULL; in ifcvf_stop_datapath()
135 ifcvf_stop_hw(vf); in ifcvf_stop_datapath()
142 struct ifcvf_hw *vf = ifcvf_private_to_vf(adapter); in ifcvf_reset_vring() local
146 vf->vring[i].last_avail_idx = 0; in ifcvf_reset_vring()
147 vf->vring[i].desc = 0; in ifcvf_reset_vring()
148 vf->vring[i].avail = 0; in ifcvf_reset_vring()
149 vf->vring[i].used = 0; in ifcvf_reset_vring()
150 vf->vring[i].ready = 0; in ifcvf_reset_vring()
151 vf->vring[i].cb.callback = NULL; in ifcvf_reset_vring()
152 vf->vring[i].cb.private = NULL; in ifcvf_reset_vring()
155 ifcvf_reset(vf); in ifcvf_reset_vring()
167 return &adapter->vf; in vdpa_to_vf()
172 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_features() local
175 features = ifcvf_get_features(vf) & IFCVF_SUPPORTED_FEATURES; in ifcvf_vdpa_get_features()
182 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_features() local
184 vf->req_features = features; in ifcvf_vdpa_set_features()
191 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_status() local
193 return ifcvf_get_status(vf); in ifcvf_vdpa_get_status()
199 struct ifcvf_hw *vf; in ifcvf_vdpa_set_status() local
203 vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_status()
205 status_old = ifcvf_get_status(vf); in ifcvf_vdpa_set_status()
225 status = ifcvf_get_status(vf); in ifcvf_vdpa_set_status()
227 ifcvf_set_status(vf, status); in ifcvf_vdpa_set_status()
237 ifcvf_set_status(vf, status); in ifcvf_vdpa_set_status()
248 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_vq_state() local
250 state->avail_index = ifcvf_get_vq_state(vf, qid); in ifcvf_vdpa_get_vq_state()
257 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_vq_state() local
259 return ifcvf_set_vq_state(vf, qid, state->avail_index); in ifcvf_vdpa_set_vq_state()
265 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_vq_cb() local
267 vf->vring[qid].cb = *cb; in ifcvf_vdpa_set_vq_cb()
273 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_vq_ready() local
275 vf->vring[qid].ready = ready; in ifcvf_vdpa_set_vq_ready()
280 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_vq_ready() local
282 return vf->vring[qid].ready; in ifcvf_vdpa_get_vq_ready()
288 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_vq_num() local
290 vf->vring[qid].size = num; in ifcvf_vdpa_set_vq_num()
297 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_vq_address() local
299 vf->vring[qid].desc = desc_area; in ifcvf_vdpa_set_vq_address()
300 vf->vring[qid].avail = driver_area; in ifcvf_vdpa_set_vq_address()
301 vf->vring[qid].used = device_area; in ifcvf_vdpa_set_vq_address()
308 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_kick_vq() local
310 ifcvf_notify_queue(vf, qid); in ifcvf_vdpa_kick_vq()
315 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_generation() local
317 return ioread8(&vf->common_cfg->config_generation); in ifcvf_vdpa_get_generation()
339 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_config() local
342 ifcvf_read_net_config(vf, offset, buf, len); in ifcvf_vdpa_get_config()
349 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_config() local
352 ifcvf_write_net_config(vf, offset, buf, len); in ifcvf_vdpa_set_config()
358 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_set_config_cb() local
360 vf->config_cb.callback = cb->callback; in ifcvf_vdpa_set_config_cb()
361 vf->config_cb.private = cb->private; in ifcvf_vdpa_set_config_cb()
367 struct ifcvf_hw *vf = vdpa_to_vf(vdpa_dev); in ifcvf_vdpa_get_vq_irq() local
369 return vf->vring[qid].irq; in ifcvf_vdpa_get_vq_irq()
404 struct ifcvf_hw *vf; in ifcvf_probe() local
451 vf = &adapter->vf; in ifcvf_probe()
452 vf->base = pcim_iomap_table(pdev); in ifcvf_probe()
457 ret = ifcvf_init_hw(vf, pdev); in ifcvf_probe()
464 vf->vring[i].irq = -EINVAL; in ifcvf_probe()