Lines Matching refs:rc
41 int rc; in efx_mcdi_get_phy_cfg() local
46 rc = efx_mcdi_rpc(efx, MC_CMD_GET_PHY_CFG, NULL, 0, in efx_mcdi_get_phy_cfg()
48 if (rc) in efx_mcdi_get_phy_cfg()
52 rc = -EIO; in efx_mcdi_get_phy_cfg()
73 netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc); in efx_mcdi_get_phy_cfg()
74 return rc; in efx_mcdi_get_phy_cfg()
82 int rc; in efx_mcdi_set_link() local
91 rc = efx_mcdi_rpc(efx, MC_CMD_SET_LINK, inbuf, sizeof(inbuf), in efx_mcdi_set_link()
93 return rc; in efx_mcdi_set_link()
100 int rc; in efx_mcdi_loopback_modes() local
102 rc = efx_mcdi_rpc(efx, MC_CMD_GET_LOOPBACK_MODES, NULL, 0, in efx_mcdi_loopback_modes()
104 if (rc) in efx_mcdi_loopback_modes()
109 rc = -EIO; in efx_mcdi_loopback_modes()
118 netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc); in efx_mcdi_loopback_modes()
119 return rc; in efx_mcdi_loopback_modes()
129 int rc; in efx_mcdi_mdio_read() local
136 rc = efx_mcdi_rpc(efx, MC_CMD_MDIO_READ, inbuf, sizeof(inbuf), in efx_mcdi_mdio_read()
138 if (rc) in efx_mcdi_mdio_read()
139 return rc; in efx_mcdi_mdio_read()
155 int rc; in efx_mcdi_mdio_write() local
163 rc = efx_mcdi_rpc(efx, MC_CMD_MDIO_WRITE, inbuf, sizeof(inbuf), in efx_mcdi_mdio_write()
165 if (rc) in efx_mcdi_mdio_write()
166 return rc; in efx_mcdi_mdio_write()
341 int rc; in efx_mcdi_phy_probe() local
348 rc = efx_mcdi_get_phy_cfg(efx, phy_data); in efx_mcdi_phy_probe()
349 if (rc != 0) in efx_mcdi_phy_probe()
354 rc = efx_mcdi_rpc(efx, MC_CMD_GET_LINK, NULL, 0, in efx_mcdi_phy_probe()
356 if (rc) in efx_mcdi_phy_probe()
408 rc = efx_mcdi_loopback_modes(efx, &efx->loopback_modes); in efx_mcdi_phy_probe()
409 if (rc != 0) in efx_mcdi_phy_probe()
432 return rc; in efx_mcdi_phy_probe()
478 int rc; in efx_mcdi_phy_poll() local
484 rc = efx_mcdi_rpc(efx, MC_CMD_GET_LINK, NULL, 0, in efx_mcdi_phy_poll()
486 if (rc) in efx_mcdi_phy_poll()
510 int rc; in efx_mcdi_phy_get_settings() local
525 rc = efx_mcdi_rpc(efx, MC_CMD_GET_LINK, NULL, 0, in efx_mcdi_phy_get_settings()
527 if (rc) in efx_mcdi_phy_get_settings()
538 int rc; in efx_mcdi_phy_set_settings() local
561 rc = efx_mcdi_set_link(efx, caps, efx_get_mcdi_phy_flags(efx), in efx_mcdi_phy_set_settings()
563 if (rc) in efx_mcdi_phy_set_settings()
564 return rc; in efx_mcdi_phy_set_settings()
581 int rc; in efx_mcdi_phy_test_alive() local
585 rc = efx_mcdi_rpc(efx, MC_CMD_GET_PHY_STATE, NULL, 0, in efx_mcdi_phy_test_alive()
587 if (rc) in efx_mcdi_phy_test_alive()
588 return rc; in efx_mcdi_phy_test_alive()
618 int rc; in efx_mcdi_bist() local
622 rc = efx_mcdi_rpc(efx, MC_CMD_START_BIST, in efx_mcdi_bist()
624 if (rc) in efx_mcdi_bist()
630 rc = efx_mcdi_rpc(efx, MC_CMD_POLL_BIST, NULL, 0, in efx_mcdi_bist()
632 if (rc) in efx_mcdi_bist()
642 rc = -ETIMEDOUT; in efx_mcdi_bist()
663 rc = count; in efx_mcdi_bist()
666 return rc; in efx_mcdi_bist()
674 int rc; in efx_mcdi_phy_run_tests() local
677 rc = efx_mcdi_bist(efx, MC_CMD_PHY_BIST, results); in efx_mcdi_phy_run_tests()
678 if (rc < 0) in efx_mcdi_phy_run_tests()
679 return rc; in efx_mcdi_phy_run_tests()
681 results += rc; in efx_mcdi_phy_run_tests()
699 rc = efx_mcdi_bist(efx, mode, results); in efx_mcdi_phy_run_tests()
700 if (rc < 0) in efx_mcdi_phy_run_tests()
701 return rc; in efx_mcdi_phy_run_tests()
702 results += rc; in efx_mcdi_phy_run_tests()
743 int rc; in efx_mcdi_phy_get_module_eeprom() local
759 rc = efx_mcdi_rpc(efx, MC_CMD_GET_PHY_MEDIA_INFO, in efx_mcdi_phy_get_module_eeprom()
763 if (rc) in efx_mcdi_phy_get_module_eeprom()
764 return rc; in efx_mcdi_phy_get_module_eeprom()
906 int rc; in efx_mcdi_mac_check_fault() local
910 rc = efx_mcdi_rpc(efx, MC_CMD_GET_LINK, NULL, 0, in efx_mcdi_mac_check_fault()
912 if (rc) in efx_mcdi_mac_check_fault()
929 int rc; in efx_mcdi_mac_stats() local
951 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_MAC_STATS, inbuf, sizeof(inbuf), in efx_mcdi_mac_stats()
954 if (rc && (rc != -ENOENT || atomic_read(&efx->active_queues))) in efx_mcdi_mac_stats()
956 NULL, 0, rc); in efx_mcdi_mac_stats()
957 return rc; in efx_mcdi_mac_stats()
993 int rc; in efx_mcdi_port_probe() local
1004 rc = efx->phy_op->probe(efx); in efx_mcdi_port_probe()
1005 if (rc != 0) in efx_mcdi_port_probe()
1006 return rc; in efx_mcdi_port_probe()
1009 rc = efx_nic_alloc_buffer(efx, &efx->stats_buffer, in efx_mcdi_port_probe()
1011 if (rc) in efx_mcdi_port_probe()
1012 return rc; in efx_mcdi_port_probe()
1034 int rc; in efx_mcdi_port_get_number() local
1036 rc = efx_mcdi_rpc(efx, MC_CMD_GET_PORT_ASSIGNMENT, NULL, 0, in efx_mcdi_port_get_number()
1038 if (rc) in efx_mcdi_port_get_number()
1039 return rc; in efx_mcdi_port_get_number()