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()
416 int i, rc = 0; in efx_ef10_pci_sriov_disable() local
429 rc = -EBUSY; in efx_ef10_pci_sriov_disable()
434 return rc; in efx_ef10_pci_sriov_disable()
453 int rc; in efx_ef10_sriov_fini() local
463 rc = efx_ef10_pci_sriov_disable(efx, true); in efx_ef10_sriov_fini()
464 if (rc) in efx_ef10_sriov_fini()
466 "Disabling SRIOV was not successful rc=%d\n", rc); in efx_ef10_sriov_fini()
477 int rc; in efx_ef10_vport_del_vf_mac() local
482 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_DEL_MAC_ADDRESS, inbuf, in efx_ef10_vport_del_vf_mac()
485 return rc; in efx_ef10_vport_del_vf_mac()
492 int rc; in efx_ef10_sriov_set_vf_mac() local
508 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
509 if (rc) { in efx_ef10_sriov_set_vf_mac()
511 return rc; in efx_ef10_sriov_set_vf_mac()
515 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); 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()
520 rc = efx_ef10_vport_del_vf_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_mac()
521 if (rc) in efx_ef10_sriov_set_vf_mac()
522 return rc; in efx_ef10_sriov_set_vf_mac()
526 rc = efx_ef10_vport_add_mac(efx, vf->vport_id, mac); in efx_ef10_sriov_set_vf_mac()
527 if (rc) in efx_ef10_sriov_set_vf_mac()
536 rc = efx_ef10_evb_port_assign(efx, vf->vport_id, vf_i); in efx_ef10_sriov_set_vf_mac()
537 if (rc) in efx_ef10_sriov_set_vf_mac()
542 rc = efx_ef10_vadaptor_alloc(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_mac()
543 if (rc) { in efx_ef10_sriov_set_vf_mac()
545 return rc; in efx_ef10_sriov_set_vf_mac()
557 return rc; in efx_ef10_sriov_set_vf_mac()
566 int rc = 0, rc2 = 0; in efx_ef10_sriov_set_vf_vlan() local
587 rc = efx_ef10_vadaptor_free(vf->efx, EVB_PORT_ID_ASSIGNED); in efx_ef10_sriov_set_vf_vlan()
588 if (rc) in efx_ef10_sriov_set_vf_vlan()
593 rc = efx_ef10_evb_port_assign(efx, EVB_PORT_ID_NULL, vf_i); in efx_ef10_sriov_set_vf_vlan()
594 if (rc) { in efx_ef10_sriov_set_vf_vlan()
607 rc = efx_ef10_vport_del_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_set_vf_vlan()
608 if (rc) in efx_ef10_sriov_set_vf_vlan()
613 rc = efx_ef10_vport_free(efx, vf->vport_id); in efx_ef10_sriov_set_vf_vlan()
614 if (rc) in efx_ef10_sriov_set_vf_vlan()
623 rc = efx_ef10_vport_alloc(efx, EVB_PORT_ID_ASSIGNED, in efx_ef10_sriov_set_vf_vlan()
626 if (rc) in efx_ef10_sriov_set_vf_vlan()
667 return rc; in efx_ef10_sriov_set_vf_vlan()
687 return rc ? rc : rc2; in efx_ef10_sriov_set_vf_vlan()
698 int rc; in efx_ef10_sriov_set_privilege_mask() local
707 rc = efx_mcdi_rpc(efx, MC_CMD_PRIVILEGE_MASK, in efx_ef10_sriov_set_privilege_mask()
711 if (rc != 0) in efx_ef10_sriov_set_privilege_mask()
712 return rc; in efx_ef10_sriov_set_privilege_mask()
729 rc = efx_mcdi_rpc(efx, MC_CMD_PRIVILEGE_MASK, in efx_ef10_sriov_set_privilege_mask()
733 if (rc != 0) in efx_ef10_sriov_set_privilege_mask()
734 return rc; in efx_ef10_sriov_set_privilege_mask()
786 int rc; in efx_ef10_sriov_get_vf_config() local
809 rc = efx_mcdi_rpc(efx, MC_CMD_LINK_STATE_MODE, inbuf, sizeof(inbuf), in efx_ef10_sriov_get_vf_config()
811 if (rc) in efx_ef10_sriov_get_vf_config()
812 return rc; in efx_ef10_sriov_get_vf_config()