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()
162 int rc; in efx_ef10_sriov_assign_vf_vport() local
167 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_assign_vf_vport()
170 if (rc) in efx_ef10_sriov_assign_vf_vport()
171 return rc; in efx_ef10_sriov_assign_vf_vport()
173 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_assign_vf_vport()
174 if (rc) { in efx_ef10_sriov_assign_vf_vport()
176 return rc; in efx_ef10_sriov_assign_vf_vport()
179 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_assign_vf_vport()
180 if (rc) in efx_ef10_sriov_assign_vf_vport()
181 return rc; in efx_ef10_sriov_assign_vf_vport()
191 int rc; in efx_ef10_sriov_alloc_vf_vswitching() local
203 rc = efx_ef10_sriov_assign_vf_vport(efx, i); in efx_ef10_sriov_alloc_vf_vswitching()
204 if (rc) in efx_ef10_sriov_alloc_vf_vswitching()
213 return rc; in efx_ef10_sriov_alloc_vf_vswitching()
219 int rc; in efx_ef10_sriov_restore_vf_vswitching() local
222 rc = efx_ef10_sriov_assign_vf_vport(efx, i); in efx_ef10_sriov_restore_vf_vswitching()
223 if (rc) in efx_ef10_sriov_restore_vf_vswitching()
230 return rc; in efx_ef10_sriov_restore_vf_vswitching()
236 int rc; in efx_ef10_vadaptor_alloc_set_features() local
238 rc = efx_ef10_vadaptor_alloc(efx, efx->vport_id); in efx_ef10_vadaptor_alloc_set_features()
239 if (rc) in efx_ef10_vadaptor_alloc_set_features()
242 rc = efx_ef10_vadaptor_query(efx, efx->vport_id, in efx_ef10_vadaptor_alloc_set_features()
244 if (rc) in efx_ef10_vadaptor_alloc_set_features()
258 return rc; in efx_ef10_vadaptor_alloc_set_features()
268 int rc; in efx_ef10_vswitching_probe_pf() local
276 rc = efx_ef10_vswitch_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_vswitching_probe_pf()
278 if (rc) in efx_ef10_vswitching_probe_pf()
281 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_vswitching_probe_pf()
284 if (rc) in efx_ef10_vswitching_probe_pf()
287 rc = efx_ef10_vport_add_mac(efx, efx->vport_id, net_dev->dev_addr); in efx_ef10_vswitching_probe_pf()
288 if (rc) in efx_ef10_vswitching_probe_pf()
292 rc = efx_ef10_vadaptor_alloc_set_features(efx); in efx_ef10_vswitching_probe_pf()
293 if (rc) in efx_ef10_vswitching_probe_pf()
306 return rc; in efx_ef10_vswitching_probe_pf()
317 int rc; in efx_ef10_vswitching_restore_pf() local
322 rc = efx_ef10_vswitching_probe_pf(efx); in efx_ef10_vswitching_restore_pf()
323 if (rc) in efx_ef10_vswitching_restore_pf()
326 rc = efx_ef10_sriov_restore_vf_vswitching(efx); in efx_ef10_vswitching_restore_pf()
327 if (rc) in efx_ef10_vswitching_restore_pf()
332 return rc; in efx_ef10_vswitching_restore_pf()
338 int rc; in efx_ef10_vswitching_restore_vf() local
343 rc = efx_ef10_vadaptor_free(efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_vswitching_restore_vf()
344 if (rc) in efx_ef10_vswitching_restore_vf()
345 return rc; in efx_ef10_vswitching_restore_vf()
382 int rc = 0; in efx_ef10_pci_sriov_enable() local
387 rc = efx_ef10_sriov_alloc_vf_vswitching(efx); in efx_ef10_pci_sriov_enable()
388 if (rc) in efx_ef10_pci_sriov_enable()
391 rc = pci_enable_sriov(dev, num_vfs); in efx_ef10_pci_sriov_enable()
392 if (rc) in efx_ef10_pci_sriov_enable()
402 return rc; in efx_ef10_pci_sriov_enable()
443 int rc; in efx_ef10_sriov_fini() local
460 rc = efx_ef10_pci_sriov_disable(efx, true); in efx_ef10_sriov_fini()
461 if (rc) in efx_ef10_sriov_fini()
463 "Disabling SRIOV was not successful rc=%d\n", rc); in efx_ef10_sriov_fini()
474 int rc; in efx_ef10_vport_del_vf_mac() local
479 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_DEL_MAC_ADDRESS, inbuf, in efx_ef10_vport_del_vf_mac()
482 return rc; in efx_ef10_vport_del_vf_mac()
489 int rc; in efx_ef10_sriov_set_vf_mac() local
505 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
506 if (rc) { in efx_ef10_sriov_set_vf_mac()
508 return rc; in efx_ef10_sriov_set_vf_mac()
512 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_mac()
513 if (rc) in efx_ef10_sriov_set_vf_mac()
514 return rc; in efx_ef10_sriov_set_vf_mac()
517 rc = efx_ef10_vport_del_vf_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_mac()
518 if (rc) in efx_ef10_sriov_set_vf_mac()
519 return rc; in efx_ef10_sriov_set_vf_mac()
523 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac); in efx_ef10_sriov_set_vf_mac()
524 if (rc) in efx_ef10_sriov_set_vf_mac()
533 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_set_vf_mac()
534 if (rc) in efx_ef10_sriov_set_vf_mac()
539 rc = efx_ef10_vadaptor_alloc(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
540 if (rc) { in efx_ef10_sriov_set_vf_mac()
542 return rc; in efx_ef10_sriov_set_vf_mac()
554 return rc; in efx_ef10_sriov_set_vf_mac()
563 int rc = 0, rc2 = 0; in efx_ef10_sriov_set_vf_vlan() local
584 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_vlan()
585 if (rc) in efx_ef10_sriov_set_vf_vlan()
590 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_vlan()
591 if (rc) { in efx_ef10_sriov_set_vf_vlan()
604 rc = efx_ef10_vport_del_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_vlan()
605 if (rc) in efx_ef10_sriov_set_vf_vlan()
610 rc = efx_ef10_vport_free(efx, vf->vport_id); in efx_ef10_sriov_set_vf_vlan()
611 if (rc) in efx_ef10_sriov_set_vf_vlan()
620 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_set_vf_vlan()
623 if (rc) in efx_ef10_sriov_set_vf_vlan()
664 return rc; in efx_ef10_sriov_set_vf_vlan()
684 return rc ? rc : rc2; in efx_ef10_sriov_set_vf_vlan()
695 int rc; in efx_ef10_sriov_set_privilege_mask() local
704 rc = efx_mcdi_rpc(efx, MC_CMD_PRIVILEGE_MASK, in efx_ef10_sriov_set_privilege_mask()
708 if (rc != 0) in efx_ef10_sriov_set_privilege_mask()
709 return rc; in efx_ef10_sriov_set_privilege_mask()
726 rc = efx_mcdi_rpc(efx, MC_CMD_PRIVILEGE_MASK, in efx_ef10_sriov_set_privilege_mask()
730 if (rc != 0) in efx_ef10_sriov_set_privilege_mask()
731 return rc; in efx_ef10_sriov_set_privilege_mask()
783 int rc; in efx_ef10_sriov_get_vf_config() local
806 rc = efx_mcdi_rpc(efx, MC_CMD_LINK_STATE_MODE, inbuf, sizeof(inbuf), in efx_ef10_sriov_get_vf_config()
808 if (rc) in efx_ef10_sriov_get_vf_config()
809 return rc; in efx_ef10_sriov_get_vf_config()