Lines Matching full:rc

34 	int rc;  in efx_ef10_vswitch_alloc()  local
43 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_VSWITCH_ALLOC, inbuf, sizeof(inbuf), in efx_ef10_vswitch_alloc()
47 if (rc == -EPROTO) { in efx_ef10_vswitch_alloc()
49 rc = efx_mcdi_rpc(efx, MC_CMD_VSWITCH_ALLOC, inbuf, in efx_ef10_vswitch_alloc()
51 } else if (rc) { in efx_ef10_vswitch_alloc()
54 NULL, 0, rc); in efx_ef10_vswitch_alloc()
56 return rc; in efx_ef10_vswitch_alloc()
78 int rc; in efx_ef10_vport_alloc() local
92 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_ALLOC, inbuf, sizeof(inbuf), in efx_ef10_vport_alloc()
94 if (rc) in efx_ef10_vport_alloc()
95 return rc; in efx_ef10_vport_alloc()
161 int rc; in efx_ef10_sriov_assign_vf_vport() local
166 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_assign_vf_vport()
169 if (rc) in efx_ef10_sriov_assign_vf_vport()
170 return rc; in efx_ef10_sriov_assign_vf_vport()
172 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_assign_vf_vport()
173 if (rc) { in efx_ef10_sriov_assign_vf_vport()
175 return rc; in efx_ef10_sriov_assign_vf_vport()
178 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_assign_vf_vport()
179 if (rc) in efx_ef10_sriov_assign_vf_vport()
180 return rc; in efx_ef10_sriov_assign_vf_vport()
190 int rc; in efx_ef10_sriov_alloc_vf_vswitching() local
202 rc = efx_ef10_sriov_assign_vf_vport(efx, i); in efx_ef10_sriov_alloc_vf_vswitching()
203 if (rc) in efx_ef10_sriov_alloc_vf_vswitching()
210 return rc; in efx_ef10_sriov_alloc_vf_vswitching()
216 int rc; in efx_ef10_sriov_restore_vf_vswitching() local
219 rc = efx_ef10_sriov_assign_vf_vport(efx, i); in efx_ef10_sriov_restore_vf_vswitching()
220 if (rc) in efx_ef10_sriov_restore_vf_vswitching()
227 return rc; in efx_ef10_sriov_restore_vf_vswitching()
233 int rc; in efx_ef10_vadaptor_alloc_set_features() local
235 rc = efx_ef10_vadaptor_alloc(efx, efx->vport_id); in efx_ef10_vadaptor_alloc_set_features()
236 if (rc) in efx_ef10_vadaptor_alloc_set_features()
239 rc = efx_ef10_vadaptor_query(efx, efx->vport_id, in efx_ef10_vadaptor_alloc_set_features()
241 if (rc) in efx_ef10_vadaptor_alloc_set_features()
255 return rc; in efx_ef10_vadaptor_alloc_set_features()
265 int rc; in efx_ef10_vswitching_probe_pf() local
273 rc = efx_ef10_vswitch_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_vswitching_probe_pf()
275 if (rc) in efx_ef10_vswitching_probe_pf()
278 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_vswitching_probe_pf()
281 if (rc) in efx_ef10_vswitching_probe_pf()
284 rc = efx_ef10_vport_add_mac(efx, efx->vport_id, net_dev->dev_addr); in efx_ef10_vswitching_probe_pf()
285 if (rc) in efx_ef10_vswitching_probe_pf()
289 rc = efx_ef10_vadaptor_alloc_set_features(efx); in efx_ef10_vswitching_probe_pf()
290 if (rc) in efx_ef10_vswitching_probe_pf()
303 return rc; in efx_ef10_vswitching_probe_pf()
314 int rc; in efx_ef10_vswitching_restore_pf() local
319 rc = efx_ef10_vswitching_probe_pf(efx); in efx_ef10_vswitching_restore_pf()
320 if (rc) in efx_ef10_vswitching_restore_pf()
323 rc = efx_ef10_sriov_restore_vf_vswitching(efx); in efx_ef10_vswitching_restore_pf()
324 if (rc) in efx_ef10_vswitching_restore_pf()
329 return rc; in efx_ef10_vswitching_restore_pf()
335 int rc; in efx_ef10_vswitching_restore_vf() local
340 rc = efx_ef10_vadaptor_free(efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_vswitching_restore_vf()
341 if (rc) in efx_ef10_vswitching_restore_vf()
342 return rc; in efx_ef10_vswitching_restore_vf()
379 int rc = 0; in efx_ef10_pci_sriov_enable() local
384 rc = efx_ef10_sriov_alloc_vf_vswitching(efx); in efx_ef10_pci_sriov_enable()
385 if (rc) in efx_ef10_pci_sriov_enable()
388 rc = pci_enable_sriov(dev, num_vfs); in efx_ef10_pci_sriov_enable()
389 if (rc) in efx_ef10_pci_sriov_enable()
399 return rc; in efx_ef10_pci_sriov_enable()
412 int rc = 0; in efx_ef10_pci_sriov_disable() local
423 rc = -EBUSY; in efx_ef10_pci_sriov_disable()
427 return rc; in efx_ef10_pci_sriov_disable()
446 int rc; in efx_ef10_sriov_fini() local
458 rc = efx_ef10_pci_sriov_disable(efx, true); in efx_ef10_sriov_fini()
459 if (rc) in efx_ef10_sriov_fini()
461 "Disabling SRIOV was not successful rc=%d\n", rc); in efx_ef10_sriov_fini()
472 int rc; in efx_ef10_vport_del_vf_mac() local
477 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_DEL_MAC_ADDRESS, inbuf, in efx_ef10_vport_del_vf_mac()
480 return rc; in efx_ef10_vport_del_vf_mac()
487 int rc; in efx_ef10_sriov_set_vf_mac() local
503 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
504 if (rc) { in efx_ef10_sriov_set_vf_mac()
506 return rc; in efx_ef10_sriov_set_vf_mac()
510 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_mac()
511 if (rc) in efx_ef10_sriov_set_vf_mac()
512 return rc; in efx_ef10_sriov_set_vf_mac()
515 rc = efx_ef10_vport_del_vf_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_mac()
516 if (rc) in efx_ef10_sriov_set_vf_mac()
517 return rc; in efx_ef10_sriov_set_vf_mac()
521 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac); in efx_ef10_sriov_set_vf_mac()
522 if (rc) in efx_ef10_sriov_set_vf_mac()
531 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_set_vf_mac()
532 if (rc) in efx_ef10_sriov_set_vf_mac()
537 rc = efx_ef10_vadaptor_alloc(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
538 if (rc) { in efx_ef10_sriov_set_vf_mac()
540 return rc; in efx_ef10_sriov_set_vf_mac()
552 return rc; in efx_ef10_sriov_set_vf_mac()
561 int rc = 0, rc2 = 0; in efx_ef10_sriov_set_vf_vlan() local
582 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_vlan()
583 if (rc) in efx_ef10_sriov_set_vf_vlan()
588 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_vlan()
589 if (rc) { in efx_ef10_sriov_set_vf_vlan()
602 rc = efx_ef10_vport_del_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_vlan()
603 if (rc) in efx_ef10_sriov_set_vf_vlan()
608 rc = efx_ef10_vport_free(efx, vf->vport_id); in efx_ef10_sriov_set_vf_vlan()
609 if (rc) in efx_ef10_sriov_set_vf_vlan()
618 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_set_vf_vlan()
621 if (rc) in efx_ef10_sriov_set_vf_vlan()
662 return rc; in efx_ef10_sriov_set_vf_vlan()
682 return rc ? rc : rc2; in efx_ef10_sriov_set_vf_vlan()
693 int rc; in efx_ef10_sriov_set_privilege_mask() local
702 rc = efx_mcdi_rpc(efx, MC_CMD_PRIVILEGE_MASK, in efx_ef10_sriov_set_privilege_mask()
706 if (rc != 0) in efx_ef10_sriov_set_privilege_mask()
707 return rc; in efx_ef10_sriov_set_privilege_mask()
724 rc = efx_mcdi_rpc(efx, MC_CMD_PRIVILEGE_MASK, in efx_ef10_sriov_set_privilege_mask()
728 if (rc != 0) in efx_ef10_sriov_set_privilege_mask()
729 return rc; in efx_ef10_sriov_set_privilege_mask()
781 int rc; in efx_ef10_sriov_get_vf_config() local
804 rc = efx_mcdi_rpc(efx, MC_CMD_LINK_STATE_MODE, inbuf, sizeof(inbuf), in efx_ef10_sriov_get_vf_config()
806 if (rc) in efx_ef10_sriov_get_vf_config()
807 return rc; in efx_ef10_sriov_get_vf_config()