Lines Matching refs:rc

121 	int rc;  in efx_ef10_get_pf_index()  local
123 rc = efx_mcdi_rpc(efx, MC_CMD_GET_FUNCTION_INFO, NULL, 0, outbuf, in efx_ef10_get_pf_index()
125 if (rc) in efx_ef10_get_pf_index()
126 return rc; in efx_ef10_get_pf_index()
140 int rc; in efx_ef10_get_vf_index() local
142 rc = efx_mcdi_rpc(efx, MC_CMD_GET_FUNCTION_INFO, NULL, 0, outbuf, in efx_ef10_get_vf_index()
144 if (rc) in efx_ef10_get_vf_index()
145 return rc; in efx_ef10_get_vf_index()
159 int rc; in efx_ef10_init_datapath_caps() local
163 rc = efx_mcdi_rpc(efx, MC_CMD_GET_CAPABILITIES, NULL, 0, in efx_ef10_init_datapath_caps()
165 if (rc) in efx_ef10_init_datapath_caps()
166 return rc; in efx_ef10_init_datapath_caps()
203 int rc; in efx_ef10_get_sysclk_freq() local
205 rc = efx_mcdi_rpc(efx, MC_CMD_GET_CLOCK, NULL, 0, in efx_ef10_get_sysclk_freq()
207 if (rc) in efx_ef10_get_sysclk_freq()
208 return rc; in efx_ef10_get_sysclk_freq()
209 rc = MCDI_DWORD(outbuf, GET_CLOCK_OUT_SYS_FREQ); in efx_ef10_get_sysclk_freq()
210 return rc > 0 ? rc : -ERANGE; in efx_ef10_get_sysclk_freq()
217 int rc; in efx_ef10_get_mac_address_pf() local
221 rc = efx_mcdi_rpc(efx, MC_CMD_GET_MAC_ADDRESSES, NULL, 0, in efx_ef10_get_mac_address_pf()
223 if (rc) in efx_ef10_get_mac_address_pf()
224 return rc; in efx_ef10_get_mac_address_pf()
238 int num_addrs, rc; in efx_ef10_get_mac_address_vf() local
242 rc = efx_mcdi_rpc(efx, MC_CMD_VPORT_GET_MAC_ADDRESSES, inbuf, in efx_ef10_get_mac_address_vf()
245 if (rc) in efx_ef10_get_mac_address_vf()
246 return rc; in efx_ef10_get_mac_address_vf()
293 int i, rc; in efx_ef10_probe() local
314 rc = efx_nic_alloc_buffer(efx, &nic_data->mcdi_buf, in efx_ef10_probe()
316 if (rc) in efx_ef10_probe()
324 rc = efx_ef10_get_warm_boot_count(efx); in efx_ef10_probe()
325 if (rc >= 0) in efx_ef10_probe()
331 nic_data->warm_boot_count = rc; in efx_ef10_probe()
344 rc = efx_mcdi_init(efx); in efx_ef10_probe()
345 if (rc) in efx_ef10_probe()
349 rc = efx_mcdi_reset(efx, RESET_TYPE_ALL); in efx_ef10_probe()
350 if (rc) in efx_ef10_probe()
354 rc = efx_mcdi_log_ctrl(efx, true, false, 0); in efx_ef10_probe()
355 if (rc) in efx_ef10_probe()
358 rc = device_create_file(&efx->pci_dev->dev, in efx_ef10_probe()
360 if (rc) in efx_ef10_probe()
363 rc = device_create_file(&efx->pci_dev->dev, &dev_attr_primary_flag); in efx_ef10_probe()
364 if (rc) in efx_ef10_probe()
367 rc = efx_ef10_get_pf_index(efx); in efx_ef10_probe()
368 if (rc) in efx_ef10_probe()
371 rc = efx_ef10_init_datapath_caps(efx); in efx_ef10_probe()
372 if (rc < 0) in efx_ef10_probe()
378 rc = efx_mcdi_port_get_number(efx); in efx_ef10_probe()
379 if (rc < 0) in efx_ef10_probe()
381 efx->port_num = rc; in efx_ef10_probe()
382 net_dev->dev_port = rc; in efx_ef10_probe()
384 rc = efx->type->get_mac_address(efx, efx->net_dev->perm_addr); in efx_ef10_probe()
385 if (rc) in efx_ef10_probe()
388 rc = efx_ef10_get_sysclk_freq(efx); in efx_ef10_probe()
389 if (rc < 0) in efx_ef10_probe()
391 efx->timer_quantum_ns = 1536000 / rc; /* 1536 cycles */ in efx_ef10_probe()
397 rc = efx_mcdi_set_workaround(efx, MC_CMD_WORKAROUND_BUG35388, true, NULL); in efx_ef10_probe()
398 if (rc == 0) { in efx_ef10_probe()
400 } else if (rc == -EPERM) { in efx_ef10_probe()
403 rc = efx_mcdi_get_workarounds(efx, NULL, &enabled); in efx_ef10_probe()
404 if (rc) in efx_ef10_probe()
408 } else if (rc != -ENOSYS && rc != -ENOENT) { in efx_ef10_probe()
415 rc = efx_mcdi_mon_probe(efx); in efx_ef10_probe()
416 if (rc && rc != -EPERM) in efx_ef10_probe()
444 return rc; in efx_ef10_probe()
451 int rc = efx_mcdi_rpc_quiet(efx, MC_CMD_FREE_VIS, NULL, 0, in efx_ef10_free_vis() local
455 if (rc == -EALREADY) in efx_ef10_free_vis()
456 rc = 0; in efx_ef10_free_vis()
457 if (rc) in efx_ef10_free_vis()
459 rc); in efx_ef10_free_vis()
460 return rc; in efx_ef10_free_vis()
470 int rc; in efx_ef10_free_piobufs() local
477 rc = efx_mcdi_rpc(efx, MC_CMD_FREE_PIOBUF, inbuf, sizeof(inbuf), in efx_ef10_free_piobufs()
479 WARN_ON(rc); in efx_ef10_free_piobufs()
491 int rc = 0; in efx_ef10_alloc_piobufs() local
496 rc = efx_mcdi_rpc(efx, MC_CMD_ALLOC_PIOBUF, NULL, 0, in efx_ef10_alloc_piobufs()
498 if (rc) in efx_ef10_alloc_piobufs()
501 rc = -EIO; in efx_ef10_alloc_piobufs()
512 if (rc) in efx_ef10_alloc_piobufs()
514 return rc; in efx_ef10_alloc_piobufs()
526 int rc; in efx_ef10_link_piobufs() local
539 rc = efx_mcdi_rpc(efx, MC_CMD_LINK_PIOBUF, in efx_ef10_link_piobufs()
542 if (rc) { in efx_ef10_link_piobufs()
546 rc); in efx_ef10_link_piobufs()
574 rc = 0; in efx_ef10_link_piobufs()
582 rc = efx_mcdi_rpc(efx, MC_CMD_LINK_PIOBUF, in efx_ef10_link_piobufs()
587 if (rc) { in efx_ef10_link_piobufs()
593 tx_queue->queue, index, rc); in efx_ef10_link_piobufs()
619 return rc; in efx_ef10_link_piobufs()
658 int rc; in efx_ef10_remove() local
688 rc = efx_ef10_free_vis(efx); in efx_ef10_remove()
689 WARN_ON(rc != 0); in efx_ef10_remove()
752 int rc; in efx_ef10_probe_vf() local
772 rc = efx_ef10_probe(efx); in efx_ef10_probe_vf()
773 if (rc) in efx_ef10_probe_vf()
774 return rc; in efx_ef10_probe_vf()
776 rc = efx_ef10_get_vf_index(efx); in efx_ef10_probe_vf()
777 if (rc) in efx_ef10_probe_vf()
799 return rc; in efx_ef10_probe_vf()
815 int rc; in efx_ef10_alloc_vis() local
819 rc = efx_mcdi_rpc(efx, MC_CMD_ALLOC_VIS, inbuf, sizeof(inbuf), in efx_ef10_alloc_vis()
821 if (rc != 0) in efx_ef10_alloc_vis()
822 return rc; in efx_ef10_alloc_vis()
846 int rc; in efx_ef10_dimension_resources() local
864 rc = efx_ef10_alloc_piobufs(efx, n_piobufs); in efx_ef10_dimension_resources()
865 if (rc) in efx_ef10_dimension_resources()
867 "failed to allocate PIO buffers (%d)\n", rc); in efx_ef10_dimension_resources()
905 rc = efx_ef10_free_vis(efx); in efx_ef10_dimension_resources()
906 if (rc != 0) in efx_ef10_dimension_resources()
907 return rc; in efx_ef10_dimension_resources()
909 rc = efx_ef10_alloc_vis(efx, min_vis, max_vis); in efx_ef10_dimension_resources()
910 if (rc != 0) in efx_ef10_dimension_resources()
911 return rc; in efx_ef10_dimension_resources()
970 rc = efx_ef10_link_piobufs(efx); in efx_ef10_dimension_resources()
971 if (rc) in efx_ef10_dimension_resources()
986 int rc; in efx_ef10_init_nic() local
989 rc = efx_ef10_init_datapath_caps(efx); in efx_ef10_init_nic()
990 if (rc) in efx_ef10_init_nic()
991 return rc; in efx_ef10_init_nic()
997 rc = efx_ef10_alloc_vis(efx, nic_data->n_allocated_vis, in efx_ef10_init_nic()
999 if (rc) in efx_ef10_init_nic()
1000 return rc; in efx_ef10_init_nic()
1005 rc = efx_ef10_alloc_piobufs(efx, nic_data->n_piobufs); in efx_ef10_init_nic()
1006 if (rc == 0) { in efx_ef10_init_nic()
1007 rc = efx_ef10_link_piobufs(efx); in efx_ef10_init_nic()
1008 if (rc) in efx_ef10_init_nic()
1013 if (rc) in efx_ef10_init_nic()
1015 "failed to restore PIO buffers (%d)\n", rc); in efx_ef10_init_nic()
1089 int rc = efx_mcdi_reset(efx, reset_type); in efx_ef10_reset() local
1094 if (reset_type == RESET_TYPE_WORLD && rc == -EPERM) in efx_ef10_reset()
1095 rc = 0; in efx_ef10_reset()
1104 reset_type == RESET_TYPE_MCDI_TIMEOUT) && !rc) in efx_ef10_reset()
1106 return rc; in efx_ef10_reset()
1459 int rc; in efx_ef10_try_update_nic_stats_vf() local
1474 rc = efx_nic_alloc_buffer(efx, &stats_buf, dma_len, GFP_ATOMIC); in efx_ef10_try_update_nic_stats_vf()
1475 if (rc) { in efx_ef10_try_update_nic_stats_vf()
1477 return rc; in efx_ef10_try_update_nic_stats_vf()
1489 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_MAC_STATS, inbuf, sizeof(inbuf), in efx_ef10_try_update_nic_stats_vf()
1492 if (rc) { in efx_ef10_try_update_nic_stats_vf()
1494 if (rc != -ENOENT || atomic_read(&efx->active_queues)) in efx_ef10_try_update_nic_stats_vf()
1496 sizeof(inbuf), NULL, 0, rc); in efx_ef10_try_update_nic_stats_vf()
1511 rc = -EAGAIN; in efx_ef10_try_update_nic_stats_vf()
1518 return rc; in efx_ef10_try_update_nic_stats_vf()
1642 int rc; in efx_ef10_mcdi_poll_reboot() local
1644 rc = efx_ef10_get_warm_boot_count(efx); in efx_ef10_mcdi_poll_reboot()
1645 if (rc < 0) { in efx_ef10_mcdi_poll_reboot()
1654 if (rc == nic_data->warm_boot_count) in efx_ef10_mcdi_poll_reboot()
1657 nic_data->warm_boot_count = rc; in efx_ef10_mcdi_poll_reboot()
1769 int rc; in efx_ef10_tx_init() local
1795 rc = efx_mcdi_rpc(efx, MC_CMD_INIT_TXQ, inbuf, inlen, in efx_ef10_tx_init()
1797 if (rc) in efx_ef10_tx_init()
1832 int rc; in efx_ef10_tx_fini() local
1837 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_FINI_TXQ, inbuf, sizeof(inbuf), in efx_ef10_tx_fini()
1840 if (rc && rc != -EALREADY) in efx_ef10_tx_fini()
1847 outbuf, outlen, rc); in efx_ef10_tx_fini()
1917 int rc; in efx_ef10_alloc_rss_context() local
1938 rc = efx_mcdi_rpc(efx, MC_CMD_RSS_CONTEXT_ALLOC, inbuf, sizeof(inbuf), in efx_ef10_alloc_rss_context()
1940 if (rc != 0) in efx_ef10_alloc_rss_context()
1941 return rc; in efx_ef10_alloc_rss_context()
1957 int rc; in efx_ef10_free_rss_context() local
1962 rc = efx_mcdi_rpc(efx, MC_CMD_RSS_CONTEXT_FREE, inbuf, sizeof(inbuf), in efx_ef10_free_rss_context()
1964 WARN_ON(rc != 0); in efx_ef10_free_rss_context()
1972 int i, rc; in efx_ef10_populate_rss_table() local
1984 rc = efx_mcdi_rpc(efx, MC_CMD_RSS_CONTEXT_SET_TABLE, tablebuf, in efx_ef10_populate_rss_table()
1986 if (rc != 0) in efx_ef10_populate_rss_table()
1987 return rc; in efx_ef10_populate_rss_table()
2015 int rc = efx_ef10_alloc_rss_context(efx, &new_rx_rss_context, in efx_ef10_rx_push_shared_rss_config() local
2018 if (rc != 0) in efx_ef10_rx_push_shared_rss_config()
2019 return rc; in efx_ef10_rx_push_shared_rss_config()
2031 int rc; in efx_ef10_rx_push_exclusive_rss_config() local
2036 rc = efx_ef10_alloc_rss_context(efx, &new_rx_rss_context, in efx_ef10_rx_push_exclusive_rss_config()
2038 if (rc == -EOPNOTSUPP) in efx_ef10_rx_push_exclusive_rss_config()
2039 return rc; in efx_ef10_rx_push_exclusive_rss_config()
2040 else if (rc != 0) in efx_ef10_rx_push_exclusive_rss_config()
2046 rc = efx_ef10_populate_rss_table(efx, new_rx_rss_context, in efx_ef10_rx_push_exclusive_rss_config()
2048 if (rc != 0) in efx_ef10_rx_push_exclusive_rss_config()
2064 netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc); in efx_ef10_rx_push_exclusive_rss_config()
2065 return rc; in efx_ef10_rx_push_exclusive_rss_config()
2071 int rc; in efx_ef10_pf_rx_push_rss_config() local
2076 rc = efx_ef10_rx_push_exclusive_rss_config(efx, rx_indir_table); in efx_ef10_pf_rx_push_rss_config()
2078 if (rc == -ENOBUFS && !user) { in efx_ef10_pf_rx_push_rss_config()
2088 rc = efx_ef10_rx_push_shared_rss_config(efx, &context_size); in efx_ef10_pf_rx_push_rss_config()
2089 if (rc == 0) { in efx_ef10_pf_rx_push_rss_config()
2109 return rc; in efx_ef10_pf_rx_push_rss_config()
2144 int rc; in efx_ef10_rx_init() local
2174 rc = efx_mcdi_rpc(efx, MC_CMD_INIT_RXQ, inbuf, inlen, in efx_ef10_rx_init()
2176 if (rc) in efx_ef10_rx_init()
2187 int rc; in efx_ef10_rx_fini() local
2192 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_FINI_RXQ, inbuf, sizeof(inbuf), in efx_ef10_rx_fini()
2195 if (rc && rc != -EALREADY) in efx_ef10_rx_fini()
2202 outbuf, outlen, rc); in efx_ef10_rx_fini()
2275 int rc, efx_dword_t *outbuf, in efx_ef10_rx_defer_refill_complete() argument
2295 int rc; in efx_ef10_ev_fini() local
2299 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_FINI_EVQ, inbuf, sizeof(inbuf), in efx_ef10_ev_fini()
2302 if (rc && rc != -EALREADY) in efx_ef10_ev_fini()
2309 outbuf, outlen, rc); in efx_ef10_ev_fini()
2325 int rc; in efx_ef10_ev_init() local
2361 rc = efx_mcdi_rpc(efx, MC_CMD_INIT_EVQ, inbuf, inlen, in efx_ef10_ev_init()
2364 if (channel->channel || rc) in efx_ef10_ev_init()
2365 return rc; in efx_ef10_ev_init()
2368 rc = efx_mcdi_get_workarounds(efx, &implemented, &enabled); in efx_ef10_ev_init()
2369 if (rc == -ENOSYS) { in efx_ef10_ev_init()
2374 rc = 0; in efx_ef10_ev_init()
2375 } else if (rc) { in efx_ef10_ev_init()
2385 rc = efx_mcdi_set_workaround(efx, in efx_ef10_ev_init()
2389 if (!rc) { in efx_ef10_ev_init()
2398 } else if (rc == -EPERM) { in efx_ef10_ev_init()
2399 rc = 0; in efx_ef10_ev_init()
2404 if (!rc) in efx_ef10_ev_init()
2409 return rc; in efx_ef10_ev_init()
2769 int rc; in efx_ef10_ev_test_generate() local
2783 rc = efx_mcdi_rpc(efx, MC_CMD_DRIVER_EVENT, inbuf, sizeof(inbuf), in efx_ef10_ev_test_generate()
2785 if (rc != 0) in efx_ef10_ev_test_generate()
2792 netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc); in efx_ef10_ev_test_generate()
3003 int rc; in efx_ef10_filter_push() local
3006 rc = efx_mcdi_rpc(efx, MC_CMD_FILTER_OP, inbuf, sizeof(inbuf), in efx_ef10_filter_push()
3008 if (rc == 0) in efx_ef10_filter_push()
3010 if (rc == -ENOSPC) in efx_ef10_filter_push()
3011 rc = -EBUSY; /* to match efx_farch_filter_insert() */ in efx_ef10_filter_push()
3012 return rc; in efx_ef10_filter_push()
3042 s32 rc; in efx_ef10_filter_insert() local
3049 rc = efx_ef10_filter_rx_match_pri(table, spec->match_flags); in efx_ef10_filter_insert()
3050 if (rc < 0) in efx_ef10_filter_insert()
3051 return rc; in efx_ef10_filter_insert()
3052 match_pri = rc; in efx_ef10_filter_insert()
3082 rc = -EPERM; in efx_ef10_filter_insert()
3090 rc = -EEXIST; in efx_ef10_filter_insert()
3113 rc = -EBUSY; in efx_ef10_filter_insert()
3142 rc = ins_index; in efx_ef10_filter_insert()
3150 rc = -ENOMEM; in efx_ef10_filter_insert()
3173 rc = efx_ef10_filter_push(efx, spec, &table->entry[ins_index].handle, in efx_ef10_filter_insert()
3178 if (rc == 0) { in efx_ef10_filter_insert()
3213 if (rc == 0) { in efx_ef10_filter_insert()
3219 rc = efx_mcdi_rpc(efx, MC_CMD_FILTER_OP, in efx_ef10_filter_insert()
3225 if (rc == 0) { in efx_ef10_filter_insert()
3238 if (rc == 0) in efx_ef10_filter_insert()
3239 rc = match_pri * HUNT_FILTER_TBL_ROWS + ins_index; in efx_ef10_filter_insert()
3245 return rc; in efx_ef10_filter_insert()
3269 int rc; in efx_ef10_filter_remove_internal() local
3290 rc = -ENOENT; in efx_ef10_filter_remove_internal()
3299 rc = 0; in efx_ef10_filter_remove_internal()
3304 rc = -ENOENT; in efx_ef10_filter_remove_internal()
3322 rc = efx_ef10_filter_push(efx, &new_spec, in efx_ef10_filter_remove_internal()
3327 if (rc == 0) in efx_ef10_filter_remove_internal()
3338 rc = efx_mcdi_rpc(efx, MC_CMD_FILTER_OP, in efx_ef10_filter_remove_internal()
3342 if (rc == 0) { in efx_ef10_filter_remove_internal()
3353 return rc; in efx_ef10_filter_remove_internal()
3384 int rc; in efx_ef10_filter_get_safe() local
3392 rc = 0; in efx_ef10_filter_get_safe()
3394 rc = -ENOENT; in efx_ef10_filter_get_safe()
3397 return rc; in efx_ef10_filter_get_safe()
3405 int rc; in efx_ef10_filter_clear_rx() local
3411 rc = efx_ef10_filter_remove_internal(efx, priority_mask, in efx_ef10_filter_clear_rx()
3413 if (rc && rc != -ENOENT) in efx_ef10_filter_clear_rx()
3414 return rc; in efx_ef10_filter_clear_rx()
3486 s32 rc; in efx_ef10_filter_rfs_insert() local
3515 rc = -EBUSY; in efx_ef10_filter_rfs_insert()
3519 rc = -EPERM; in efx_ef10_filter_rfs_insert()
3532 rc = -EBUSY; in efx_ef10_filter_rfs_insert()
3552 rc = -ENOMEM; in efx_ef10_filter_rfs_insert()
3575 return rc; in efx_ef10_filter_rfs_insert()
3580 int rc, efx_dword_t *outbuf, in efx_ef10_filter_rfs_insert_complete() argument
3595 if (rc == 0) { in efx_ef10_filter_rfs_insert_complete()
3613 int rc, efx_dword_t *outbuf,
3648 int rc, efx_dword_t *outbuf, in efx_ef10_filter_rfs_expire_complete() argument
3656 if (rc == 0) { in efx_ef10_filter_rfs_expire_complete()
3706 int rc; in efx_ef10_filter_table_probe() local
3715 rc = efx_mcdi_rpc(efx, MC_CMD_GET_PARSER_DISP_INFO, in efx_ef10_filter_table_probe()
3718 if (rc) in efx_ef10_filter_table_probe()
3730 rc = efx_ef10_filter_match_flags_from_mcdi(mcdi_flags); in efx_ef10_filter_table_probe()
3731 if (rc < 0) { in efx_ef10_filter_table_probe()
3739 rc, table->rx_match_count); in efx_ef10_filter_table_probe()
3740 table->rx_match_flags[table->rx_match_count++] = rc; in efx_ef10_filter_table_probe()
3746 rc = -ENOMEM; in efx_ef10_filter_table_probe()
3760 return rc; in efx_ef10_filter_table_probe()
3773 int rc; in efx_ef10_filter_table_restore() local
3793 rc = efx_ef10_filter_push(efx, spec, in efx_ef10_filter_table_restore()
3796 if (rc) in efx_ef10_filter_table_restore()
3800 if (rc) { in efx_ef10_filter_table_restore()
3825 int rc; in efx_ef10_filter_table_remove() local
3842 rc = efx_mcdi_rpc(efx, MC_CMD_FILTER_OP, inbuf, sizeof(inbuf), in efx_ef10_filter_table_remove()
3844 if (rc) in efx_ef10_filter_table_remove()
3946 int rc; in efx_ef10_filter_insert_addr_list() local
3963 rc = efx_ef10_filter_insert(efx, &spec, true); in efx_ef10_filter_insert_addr_list()
3964 if (rc < 0) { in efx_ef10_filter_insert_addr_list()
3968 rc); in efx_ef10_filter_insert_addr_list()
3978 return rc; in efx_ef10_filter_insert_addr_list()
3981 rc = EFX_EF10_FILTER_ID_INVALID; in efx_ef10_filter_insert_addr_list()
3984 addr_list[i].id = efx_ef10_filter_get_unsafe_id(efx, rc); in efx_ef10_filter_insert_addr_list()
3992 rc = efx_ef10_filter_insert(efx, &spec, true); in efx_ef10_filter_insert_addr_list()
3993 if (rc < 0) { in efx_ef10_filter_insert_addr_list()
3995 "Broadcast filter insert failed rc=%d\n", rc); in efx_ef10_filter_insert_addr_list()
4005 return rc; in efx_ef10_filter_insert_addr_list()
4007 table->bcast_id = efx_ef10_filter_get_unsafe_id(efx, rc); in efx_ef10_filter_insert_addr_list()
4022 int rc; in efx_ef10_filter_insert_def() local
4033 rc = efx_ef10_filter_insert(efx, &spec, true); in efx_ef10_filter_insert_def()
4034 if (rc < 0) { in efx_ef10_filter_insert_def()
4037 multicast ? "Multi" : "Uni", rc); in efx_ef10_filter_insert_def()
4039 table->mcdef_id = efx_ef10_filter_get_unsafe_id(efx, rc); in efx_ef10_filter_insert_def()
4047 rc = efx_ef10_filter_insert(efx, &spec, true); in efx_ef10_filter_insert_def()
4048 if (rc < 0) { in efx_ef10_filter_insert_def()
4051 rc); in efx_ef10_filter_insert_def()
4058 return rc; in efx_ef10_filter_insert_def()
4061 table->bcast_id = efx_ef10_filter_get_unsafe_id(efx, rc); in efx_ef10_filter_insert_def()
4064 rc = 0; in efx_ef10_filter_insert_def()
4066 table->ucdef_id = rc; in efx_ef10_filter_insert_def()
4067 rc = 0; in efx_ef10_filter_insert_def()
4069 return rc; in efx_ef10_filter_insert_def()
4098 int rc, rc2; in efx_ef10_vport_set_mac_address() local
4110 rc = efx_ef10_vadaptor_free(efx, nic_data->vport_id); in efx_ef10_vport_set_mac_address()
4111 if (rc) in efx_ef10_vport_set_mac_address()
4115 rc = efx_ef10_vport_del_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
4117 if (rc) in efx_ef10_vport_set_mac_address()
4120 rc = efx_ef10_vport_add_mac(efx, nic_data->vport_id, in efx_ef10_vport_set_mac_address()
4122 if (!rc) { in efx_ef10_vport_set_mac_address()
4150 return rc; in efx_ef10_vport_set_mac_address()
4157 return rc ? rc : rc2; in efx_ef10_vport_set_mac_address()
4246 int rc; in efx_ef10_set_mac_address() local
4257 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_VADAPTOR_SET_MAC, inbuf, in efx_ef10_set_mac_address()
4270 if (rc == -EPERM) { in efx_ef10_set_mac_address()
4276 rc = efx_ef10_sriov_set_vf_mac(efx_pf, in efx_ef10_set_mac_address()
4279 } else if (!rc) { in efx_ef10_set_mac_address()
4299 if (rc == -EPERM) { in efx_ef10_set_mac_address()
4303 } else if (rc == -ENOSYS && !efx_ef10_is_vf(efx)) { in efx_ef10_set_mac_address()
4309 rc = efx_ef10_vport_set_mac_address(efx); in efx_ef10_set_mac_address()
4312 sizeof(inbuf), NULL, 0, rc); in efx_ef10_set_mac_address()
4315 return rc; in efx_ef10_set_mac_address()
4347 int rc; in efx_ef10_poll_bist() local
4352 rc = efx_mcdi_rpc(efx, MC_CMD_POLL_BIST, NULL, 0, in efx_ef10_poll_bist()
4354 if (rc != 0) in efx_ef10_poll_bist()
4355 return rc; in efx_ef10_poll_bist()
4380 int rc; in efx_ef10_run_bist() local
4384 rc = efx_ef10_start_bist(efx, bist_type); in efx_ef10_run_bist()
4385 if (rc != 0) in efx_ef10_run_bist()
4386 return rc; in efx_ef10_run_bist()
4394 int rc, rc2; in efx_ef10_test_chip() local
4398 rc = efx_mcdi_rpc(efx, MC_CMD_ENABLE_OFFLINE_BIST, in efx_ef10_test_chip()
4400 if (rc != 0) in efx_ef10_test_chip()
4406 rc = efx_mcdi_reset(efx, RESET_TYPE_WORLD); in efx_ef10_test_chip()
4409 if (rc == -EPERM) in efx_ef10_test_chip()
4410 rc = 0; in efx_ef10_test_chip()
4411 rc2 = efx_reset_up(efx, RESET_TYPE_WORLD, rc == 0); in efx_ef10_test_chip()
4412 return rc ? rc : rc2; in efx_ef10_test_chip()
4446 int rc; in efx_ef10_mtd_probe_partition() local
4458 rc = efx_mcdi_nvram_info(efx, type, &size, &erase_size, &protected); in efx_ef10_mtd_probe_partition()
4459 if (rc) in efx_ef10_mtd_probe_partition()
4460 return rc; in efx_ef10_mtd_probe_partition()
4467 rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_METADATA, inbuf, sizeof(inbuf), in efx_ef10_mtd_probe_partition()
4469 if (rc) in efx_ef10_mtd_probe_partition()
4470 return rc; in efx_ef10_mtd_probe_partition()
4495 int rc; in efx_ef10_mtd_probe() local
4500 rc = efx_mcdi_rpc(efx, MC_CMD_NVRAM_PARTITIONS, NULL, 0, in efx_ef10_mtd_probe()
4502 if (rc) in efx_ef10_mtd_probe()
4503 return rc; in efx_ef10_mtd_probe()
4520 rc = efx_ef10_mtd_probe_partition(efx, &parts[n_parts], type); in efx_ef10_mtd_probe()
4521 if (rc == 0) in efx_ef10_mtd_probe()
4523 else if (rc != -ENODEV) in efx_ef10_mtd_probe()
4527 rc = efx_mtd_add(efx, &parts[0].common, n_parts, sizeof(*parts)); in efx_ef10_mtd_probe()
4529 if (rc) in efx_ef10_mtd_probe()
4531 return rc; in efx_ef10_mtd_probe()
4548 int rc; in efx_ef10_rx_enable_timestamping() local
4561 rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP, in efx_ef10_rx_enable_timestamping()
4564 if (rc != 0) in efx_ef10_rx_enable_timestamping()
4568 return rc; in efx_ef10_rx_enable_timestamping()
4575 int rc; in efx_ef10_rx_disable_timestamping() local
4594 rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP, in efx_ef10_rx_disable_timestamping()
4597 return rc; in efx_ef10_rx_disable_timestamping()
4611 int rc = set(channel, temp); in efx_ef10_ptp_set_ts_sync_events() local
4612 if (en && rc != 0) { in efx_ef10_ptp_set_ts_sync_events()
4614 return rc; in efx_ef10_ptp_set_ts_sync_events()
4630 int rc; in efx_ef10_ptp_set_ts_config() local
4652 rc = efx_ptp_change_mode(efx, true, 0); in efx_ef10_ptp_set_ts_config()
4653 if (!rc) in efx_ef10_ptp_set_ts_config()
4654 rc = efx_ef10_ptp_set_ts_sync_events(efx, true, false); in efx_ef10_ptp_set_ts_config()
4655 if (rc) in efx_ef10_ptp_set_ts_config()
4657 return rc; in efx_ef10_ptp_set_ts_config()