Lines Matching refs:rc
36 int rc; in efx_ef10_vswitch_alloc() local
45 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_VSWITCH_ALLOC, inbuf, sizeof(inbuf), in efx_ef10_vswitch_alloc()
49 if (rc == -EPROTO) { in efx_ef10_vswitch_alloc()
51 rc = efx_mcdi_rpc(efx, MC_CMD_VSWITCH_ALLOC, inbuf, in efx_ef10_vswitch_alloc()
53 } else if (rc) { in efx_ef10_vswitch_alloc()
56 NULL, 0, rc); in efx_ef10_vswitch_alloc()
58 return rc; in efx_ef10_vswitch_alloc()
80 int rc; in efx_ef10_vport_alloc() local
94 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_ALLOC, inbuf, sizeof(inbuf), in efx_ef10_vport_alloc()
96 if (rc) in efx_ef10_vport_alloc()
97 return rc; in efx_ef10_vport_alloc()
164 int rc; in efx_ef10_sriov_assign_vf_vport() local
169 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_assign_vf_vport()
172 if (rc) in efx_ef10_sriov_assign_vf_vport()
173 return rc; in efx_ef10_sriov_assign_vf_vport()
175 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_assign_vf_vport()
176 if (rc) { in efx_ef10_sriov_assign_vf_vport()
178 return rc; in efx_ef10_sriov_assign_vf_vport()
181 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_assign_vf_vport()
182 if (rc) in efx_ef10_sriov_assign_vf_vport()
183 return rc; in efx_ef10_sriov_assign_vf_vport()
193 int rc; in efx_ef10_sriov_alloc_vf_vswitching() local
205 rc = efx_ef10_sriov_assign_vf_vport(efx, i); in efx_ef10_sriov_alloc_vf_vswitching()
206 if (rc) in efx_ef10_sriov_alloc_vf_vswitching()
215 return rc; in efx_ef10_sriov_alloc_vf_vswitching()
221 int rc; in efx_ef10_sriov_restore_vf_vswitching() local
224 rc = efx_ef10_sriov_assign_vf_vport(efx, i); in efx_ef10_sriov_restore_vf_vswitching()
225 if (rc) in efx_ef10_sriov_restore_vf_vswitching()
232 return rc; in efx_ef10_sriov_restore_vf_vswitching()
242 int rc; in efx_ef10_vswitching_probe_pf() local
250 rc = efx_ef10_vswitch_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_vswitching_probe_pf()
252 if (rc) in efx_ef10_vswitching_probe_pf()
255 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_vswitching_probe_pf()
258 if (rc) in efx_ef10_vswitching_probe_pf()
261 rc = efx_ef10_vport_add_mac(efx, nic_data->vport_id, net_dev->dev_addr); in efx_ef10_vswitching_probe_pf()
262 if (rc) in efx_ef10_vswitching_probe_pf()
266 rc = efx_ef10_vadaptor_alloc(efx, nic_data->vport_id); in efx_ef10_vswitching_probe_pf()
267 if (rc) in efx_ef10_vswitching_probe_pf()
280 return rc; in efx_ef10_vswitching_probe_pf()
293 int rc; in efx_ef10_vswitching_restore_pf() local
298 rc = efx_ef10_vswitching_probe_pf(efx); in efx_ef10_vswitching_restore_pf()
299 if (rc) in efx_ef10_vswitching_restore_pf()
302 rc = efx_ef10_sriov_restore_vf_vswitching(efx); in efx_ef10_vswitching_restore_pf()
303 if (rc) in efx_ef10_vswitching_restore_pf()
308 return rc; in efx_ef10_vswitching_restore_pf()
314 int rc; in efx_ef10_vswitching_restore_vf() local
319 rc = efx_ef10_vadaptor_free(efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_vswitching_restore_vf()
320 if (rc) in efx_ef10_vswitching_restore_vf()
321 return rc; in efx_ef10_vswitching_restore_vf()
358 int rc = 0; in efx_ef10_pci_sriov_enable() local
363 rc = efx_ef10_sriov_alloc_vf_vswitching(efx); in efx_ef10_pci_sriov_enable()
364 if (rc) in efx_ef10_pci_sriov_enable()
367 rc = pci_enable_sriov(dev, num_vfs); in efx_ef10_pci_sriov_enable()
368 if (rc) in efx_ef10_pci_sriov_enable()
378 return rc; in efx_ef10_pci_sriov_enable()
419 int rc; in efx_ef10_sriov_fini() local
436 rc = efx_ef10_pci_sriov_disable(efx, true); in efx_ef10_sriov_fini()
437 if (rc) in efx_ef10_sriov_fini()
439 "Disabling SRIOV was not successful rc=%d\n", rc); in efx_ef10_sriov_fini()
450 int rc; in efx_ef10_vport_del_vf_mac() local
455 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_DEL_MAC_ADDRESS, inbuf, in efx_ef10_vport_del_vf_mac()
458 return rc; in efx_ef10_vport_del_vf_mac()
465 int rc; in efx_ef10_sriov_set_vf_mac() local
481 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
482 if (rc) { in efx_ef10_sriov_set_vf_mac()
484 return rc; in efx_ef10_sriov_set_vf_mac()
488 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_mac()
489 if (rc) in efx_ef10_sriov_set_vf_mac()
490 return rc; in efx_ef10_sriov_set_vf_mac()
493 rc = efx_ef10_vport_del_vf_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_mac()
494 if (rc) in efx_ef10_sriov_set_vf_mac()
495 return rc; in efx_ef10_sriov_set_vf_mac()
499 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac); in efx_ef10_sriov_set_vf_mac()
500 if (rc) { in efx_ef10_sriov_set_vf_mac()
510 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_set_vf_mac()
511 if (rc) in efx_ef10_sriov_set_vf_mac()
516 rc = efx_ef10_vadaptor_alloc(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
517 if (rc) { in efx_ef10_sriov_set_vf_mac()
519 return rc; in efx_ef10_sriov_set_vf_mac()
531 return rc; in efx_ef10_sriov_set_vf_mac()
540 int rc = 0, rc2 = 0; in efx_ef10_sriov_set_vf_vlan() local
560 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_vlan()
561 if (rc) in efx_ef10_sriov_set_vf_vlan()
566 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_vlan()
567 if (rc) { in efx_ef10_sriov_set_vf_vlan()
580 rc = efx_ef10_vport_del_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_vlan()
581 if (rc) in efx_ef10_sriov_set_vf_vlan()
586 rc = efx_ef10_vport_free(efx, vf->vport_id); in efx_ef10_sriov_set_vf_vlan()
587 if (rc) in efx_ef10_sriov_set_vf_vlan()
597 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_set_vf_vlan()
600 if (rc) in efx_ef10_sriov_set_vf_vlan()
642 return rc; in efx_ef10_sriov_set_vf_vlan()
661 return rc ? rc : rc2; in efx_ef10_sriov_set_vf_vlan()
700 int rc; in efx_ef10_sriov_get_vf_config() local
723 rc = efx_mcdi_rpc(efx, MC_CMD_LINK_STATE_MODE, inbuf, sizeof(inbuf), in efx_ef10_sriov_get_vf_config()
725 if (rc) in efx_ef10_sriov_get_vf_config()
726 return rc; in efx_ef10_sriov_get_vf_config()