Lines Matching refs:ret_val
424 int32_t ret_val = E1000_SUCCESS; in e1000_init_eeprom_params() local
572 ret_val = e1000_read_eeprom(hw, EEPROM_CFG, 1, in e1000_init_eeprom_params()
574 if (ret_val) in e1000_init_eeprom_params()
575 return ret_val; in e1000_init_eeprom_params()
592 return ret_val; in e1000_init_eeprom_params()
882 int32_t ret_val = 0; in e1000_write_eeprom_srwr() local
890 ret_val = -E1000_ERR_EEPROM; in e1000_write_eeprom_srwr()
904 ret_val = 0; in e1000_write_eeprom_srwr()
910 if (ret_val) { in e1000_write_eeprom_srwr()
917 return ret_val; in e1000_write_eeprom_srwr()
927 int32_t ret_val = -E1000_ERR_EEPROM; in e1000_pool_flash_update_done_i210() local
933 ret_val = 0; in e1000_pool_flash_update_done_i210()
939 return ret_val; in e1000_pool_flash_update_done_i210()
949 int32_t ret_val = 0; in e1000_update_flash_i210() local
952 ret_val = e1000_pool_flash_update_done_i210(hw); in e1000_update_flash_i210()
953 if (ret_val == -E1000_ERR_EEPROM) { in e1000_update_flash_i210()
961 ret_val = e1000_pool_flash_update_done_i210(hw); in e1000_update_flash_i210()
962 if (ret_val) in e1000_update_flash_i210()
968 return ret_val; in e1000_update_flash_i210()
981 int32_t ret_val = 0; in e1000_update_eeprom_checksum_i210() local
989 ret_val = e1000_read_eeprom_eerd(hw, 0, 1, &nvm_data); in e1000_update_eeprom_checksum_i210()
990 if (ret_val) { in e1000_update_eeprom_checksum_i210()
1002 ret_val = e1000_read_eeprom_eerd(hw, i, 1, &nvm_data); in e1000_update_eeprom_checksum_i210()
1003 if (ret_val) { in e1000_update_eeprom_checksum_i210()
1011 ret_val = e1000_write_eeprom_srwr(hw, EEPROM_CHECKSUM_REG, 1, in e1000_update_eeprom_checksum_i210()
1013 if (ret_val) { in e1000_update_eeprom_checksum_i210()
1021 ret_val = e1000_update_flash_i210(hw); in e1000_update_eeprom_checksum_i210()
1023 ret_val = -E1000_ERR_SWFW_SYNC; in e1000_update_eeprom_checksum_i210()
1027 return ret_val; in e1000_update_eeprom_checksum_i210()
1090 int32_t ret_val; in e1000_set_phy_mode() local
1097 ret_val = e1000_read_eeprom(hw, EEPROM_PHY_CLASS_WORD, in e1000_set_phy_mode()
1099 if (ret_val) in e1000_set_phy_mode()
1100 return ret_val; in e1000_set_phy_mode()
1104 ret_val = e1000_write_phy_reg(hw, in e1000_set_phy_mode()
1106 if (ret_val) in e1000_set_phy_mode()
1107 return ret_val; in e1000_set_phy_mode()
1108 ret_val = e1000_write_phy_reg(hw, in e1000_set_phy_mode()
1110 if (ret_val) in e1000_set_phy_mode()
1111 return ret_val; in e1000_set_phy_mode()
1381 int ret_val; in e1000_read_mac_addr() local
1385 ret_val = e1000_read_mac_addr_from_regs(hw, enetaddr); in e1000_read_mac_addr()
1387 ret_val = e1000_read_mac_addr_from_eeprom(hw, enetaddr); in e1000_read_mac_addr()
1389 if (ret_val) in e1000_read_mac_addr()
1390 return ret_val; in e1000_read_mac_addr()
1848 int32_t ret_val; in e1000_init_hw() local
1979 ret_val = e1000_setup_link(hw); in e1000_init_hw()
2050 return ret_val; in e1000_init_hw()
2067 int32_t ret_val; in e1000_setup_link() local
2105 ret_val = e1000_read_eeprom(hw, in e1000_setup_link()
2107 if (ret_val) { in e1000_setup_link()
2153 ret_val = (hw->media_type == e1000_media_type_fiber) ? in e1000_setup_link()
2155 if (ret_val < 0) { in e1000_setup_link()
2156 return ret_val; in e1000_setup_link()
2198 return ret_val; in e1000_setup_link()
2218 int32_t ret_val; in e1000_setup_fiber_link() local
2319 ret_val = e1000_check_for_link(hw); in e1000_setup_fiber_link()
2320 if (ret_val < 0) { in e1000_setup_fiber_link()
2322 return ret_val; in e1000_setup_fiber_link()
2345 int32_t ret_val; in e1000_copper_link_preconfig() local
2363 ret_val = e1000_phy_hw_reset(hw); in e1000_copper_link_preconfig()
2364 if (ret_val) in e1000_copper_link_preconfig()
2365 return ret_val; in e1000_copper_link_preconfig()
2369 ret_val = e1000_detect_gig_phy(hw); in e1000_copper_link_preconfig()
2370 if (ret_val) { in e1000_copper_link_preconfig()
2372 return ret_val; in e1000_copper_link_preconfig()
2377 ret_val = e1000_set_phy_mode(hw); in e1000_copper_link_preconfig()
2378 if (ret_val) in e1000_copper_link_preconfig()
2379 return ret_val; in e1000_copper_link_preconfig()
2382 ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, in e1000_copper_link_preconfig()
2385 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, in e1000_copper_link_preconfig()
2416 int32_t ret_val; in e1000_set_d3_lplu_state() local
2429 ret_val = e1000_read_phy_reg(hw, IGP01E1000_GMII_FIFO, in e1000_set_d3_lplu_state()
2431 if (ret_val) in e1000_set_d3_lplu_state()
2432 return ret_val; in e1000_set_d3_lplu_state()
2439 ret_val = e1000_read_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, in e1000_set_d3_lplu_state()
2441 if (ret_val) in e1000_set_d3_lplu_state()
2442 return ret_val; in e1000_set_d3_lplu_state()
2449 ret_val = e1000_write_phy_reg(hw, IGP01E1000_GMII_FIFO, in e1000_set_d3_lplu_state()
2451 if (ret_val) in e1000_set_d3_lplu_state()
2452 return ret_val; in e1000_set_d3_lplu_state()
2459 ret_val = e1000_write_phy_reg(hw, in e1000_set_d3_lplu_state()
2461 if (ret_val) in e1000_set_d3_lplu_state()
2462 return ret_val; in e1000_set_d3_lplu_state()
2471 ret_val = e1000_read_phy_reg(hw, in e1000_set_d3_lplu_state()
2473 if (ret_val) in e1000_set_d3_lplu_state()
2474 return ret_val; in e1000_set_d3_lplu_state()
2477 ret_val = e1000_write_phy_reg(hw, in e1000_set_d3_lplu_state()
2479 if (ret_val) in e1000_set_d3_lplu_state()
2480 return ret_val; in e1000_set_d3_lplu_state()
2482 ret_val = e1000_read_phy_reg(hw, in e1000_set_d3_lplu_state()
2484 if (ret_val) in e1000_set_d3_lplu_state()
2485 return ret_val; in e1000_set_d3_lplu_state()
2488 ret_val = e1000_write_phy_reg(hw, in e1000_set_d3_lplu_state()
2490 if (ret_val) in e1000_set_d3_lplu_state()
2491 return ret_val; in e1000_set_d3_lplu_state()
2501 ret_val = e1000_write_phy_reg(hw, in e1000_set_d3_lplu_state()
2503 if (ret_val) in e1000_set_d3_lplu_state()
2504 return ret_val; in e1000_set_d3_lplu_state()
2511 ret_val = e1000_write_phy_reg(hw, in e1000_set_d3_lplu_state()
2513 if (ret_val) in e1000_set_d3_lplu_state()
2514 return ret_val; in e1000_set_d3_lplu_state()
2519 ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d3_lplu_state()
2521 if (ret_val) in e1000_set_d3_lplu_state()
2522 return ret_val; in e1000_set_d3_lplu_state()
2525 ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d3_lplu_state()
2527 if (ret_val) in e1000_set_d3_lplu_state()
2528 return ret_val; in e1000_set_d3_lplu_state()
2551 int32_t ret_val; in e1000_set_d0_lplu_state() local
2563 ret_val = e1000_read_phy_reg(hw, IGP02E1000_PHY_POWER_MGMT, in e1000_set_d0_lplu_state()
2565 if (ret_val) in e1000_set_d0_lplu_state()
2566 return ret_val; in e1000_set_d0_lplu_state()
2578 ret_val = e1000_write_phy_reg(hw, in e1000_set_d0_lplu_state()
2580 if (ret_val) in e1000_set_d0_lplu_state()
2581 return ret_val; in e1000_set_d0_lplu_state()
2592 ret_val = e1000_read_phy_reg(hw, in e1000_set_d0_lplu_state()
2594 if (ret_val) in e1000_set_d0_lplu_state()
2595 return ret_val; in e1000_set_d0_lplu_state()
2598 ret_val = e1000_write_phy_reg(hw, in e1000_set_d0_lplu_state()
2600 if (ret_val) in e1000_set_d0_lplu_state()
2601 return ret_val; in e1000_set_d0_lplu_state()
2603 ret_val = e1000_read_phy_reg(hw, in e1000_set_d0_lplu_state()
2605 if (ret_val) in e1000_set_d0_lplu_state()
2606 return ret_val; in e1000_set_d0_lplu_state()
2609 ret_val = e1000_write_phy_reg(hw, in e1000_set_d0_lplu_state()
2611 if (ret_val) in e1000_set_d0_lplu_state()
2612 return ret_val; in e1000_set_d0_lplu_state()
2626 ret_val = e1000_write_phy_reg(hw, in e1000_set_d0_lplu_state()
2628 if (ret_val) in e1000_set_d0_lplu_state()
2629 return ret_val; in e1000_set_d0_lplu_state()
2636 ret_val = e1000_read_phy_reg(hw, in e1000_set_d0_lplu_state()
2638 if (ret_val) in e1000_set_d0_lplu_state()
2639 return ret_val; in e1000_set_d0_lplu_state()
2642 ret_val = e1000_write_phy_reg(hw, in e1000_set_d0_lplu_state()
2644 if (ret_val) in e1000_set_d0_lplu_state()
2645 return ret_val; in e1000_set_d0_lplu_state()
2660 int32_t ret_val; in e1000_copper_link_igp_setup() local
2668 ret_val = e1000_phy_reset(hw); in e1000_copper_link_igp_setup()
2669 if (ret_val) { in e1000_copper_link_igp_setup()
2671 return ret_val; in e1000_copper_link_igp_setup()
2687 ret_val = e1000_set_d3_lplu_state(hw, false); in e1000_copper_link_igp_setup()
2688 if (ret_val) { in e1000_copper_link_igp_setup()
2690 return ret_val; in e1000_copper_link_igp_setup()
2695 ret_val = e1000_set_d0_lplu_state(hw, false); in e1000_copper_link_igp_setup()
2696 if (ret_val) { in e1000_copper_link_igp_setup()
2698 return ret_val; in e1000_copper_link_igp_setup()
2701 ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, &phy_data); in e1000_copper_link_igp_setup()
2702 if (ret_val) in e1000_copper_link_igp_setup()
2703 return ret_val; in e1000_copper_link_igp_setup()
2729 ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, phy_data); in e1000_copper_link_igp_setup()
2730 if (ret_val) in e1000_copper_link_igp_setup()
2731 return ret_val; in e1000_copper_link_igp_setup()
2748 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_igp_setup()
2750 if (ret_val) in e1000_copper_link_igp_setup()
2751 return ret_val; in e1000_copper_link_igp_setup()
2753 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_igp_setup()
2755 if (ret_val) in e1000_copper_link_igp_setup()
2756 return ret_val; in e1000_copper_link_igp_setup()
2758 ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, in e1000_copper_link_igp_setup()
2760 if (ret_val) in e1000_copper_link_igp_setup()
2761 return ret_val; in e1000_copper_link_igp_setup()
2763 ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, in e1000_copper_link_igp_setup()
2765 if (ret_val) in e1000_copper_link_igp_setup()
2766 return ret_val; in e1000_copper_link_igp_setup()
2769 ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &phy_data); in e1000_copper_link_igp_setup()
2770 if (ret_val) in e1000_copper_link_igp_setup()
2771 return ret_val; in e1000_copper_link_igp_setup()
2793 ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, phy_data); in e1000_copper_link_igp_setup()
2794 if (ret_val) in e1000_copper_link_igp_setup()
2795 return ret_val; in e1000_copper_link_igp_setup()
2882 int32_t ret_val; in e1000_copper_link_ggp_setup() local
2890 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_ggp_setup()
2892 if (ret_val) in e1000_copper_link_ggp_setup()
2893 return ret_val; in e1000_copper_link_ggp_setup()
2899 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_ggp_setup()
2901 if (ret_val) in e1000_copper_link_ggp_setup()
2902 return ret_val; in e1000_copper_link_ggp_setup()
2911 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_ggp_setup()
2913 if (ret_val) in e1000_copper_link_ggp_setup()
2914 return ret_val; in e1000_copper_link_ggp_setup()
2938 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_ggp_setup()
2941 if (ret_val) in e1000_copper_link_ggp_setup()
2942 return ret_val; in e1000_copper_link_ggp_setup()
2945 ret_val = e1000_phy_reset(hw); in e1000_copper_link_ggp_setup()
2946 if (ret_val) { in e1000_copper_link_ggp_setup()
2948 return ret_val; in e1000_copper_link_ggp_setup()
2954 ret_val = e1000_write_kmrn_reg(hw, in e1000_copper_link_ggp_setup()
2958 if (ret_val) in e1000_copper_link_ggp_setup()
2959 return ret_val; in e1000_copper_link_ggp_setup()
2961 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_ggp_setup()
2963 if (ret_val) in e1000_copper_link_ggp_setup()
2964 return ret_val; in e1000_copper_link_ggp_setup()
2967 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_ggp_setup()
2970 if (ret_val) in e1000_copper_link_ggp_setup()
2971 return ret_val; in e1000_copper_link_ggp_setup()
2977 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_ggp_setup()
2979 if (ret_val) in e1000_copper_link_ggp_setup()
2980 return ret_val; in e1000_copper_link_ggp_setup()
2989 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_ggp_setup()
2991 if (ret_val) in e1000_copper_link_ggp_setup()
2992 return ret_val; in e1000_copper_link_ggp_setup()
2994 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_ggp_setup()
2996 if (ret_val) in e1000_copper_link_ggp_setup()
2997 return ret_val; in e1000_copper_link_ggp_setup()
3000 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_ggp_setup()
3003 if (ret_val) in e1000_copper_link_ggp_setup()
3004 return ret_val; in e1000_copper_link_ggp_setup()
3010 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_ggp_setup()
3012 if (ret_val) in e1000_copper_link_ggp_setup()
3013 return ret_val; in e1000_copper_link_ggp_setup()
3015 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_ggp_setup()
3017 if (ret_val) in e1000_copper_link_ggp_setup()
3018 return ret_val; in e1000_copper_link_ggp_setup()
3031 int32_t ret_val; in e1000_copper_link_mgp_setup() local
3040 ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in e1000_copper_link_mgp_setup()
3041 if (ret_val) in e1000_copper_link_mgp_setup()
3042 return ret_val; in e1000_copper_link_mgp_setup()
3078 ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); in e1000_copper_link_mgp_setup()
3079 if (ret_val) in e1000_copper_link_mgp_setup()
3080 return ret_val; in e1000_copper_link_mgp_setup()
3086 ret_val = e1000_read_phy_reg(hw, in e1000_copper_link_mgp_setup()
3088 if (ret_val) in e1000_copper_link_mgp_setup()
3089 return ret_val; in e1000_copper_link_mgp_setup()
3098 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_mgp_setup()
3100 if (ret_val) in e1000_copper_link_mgp_setup()
3101 return ret_val; in e1000_copper_link_mgp_setup()
3108 ret_val = e1000_write_phy_reg(hw, in e1000_copper_link_mgp_setup()
3110 if (ret_val) in e1000_copper_link_mgp_setup()
3111 return ret_val; in e1000_copper_link_mgp_setup()
3116 ret_val = e1000_phy_reset(hw); in e1000_copper_link_mgp_setup()
3117 if (ret_val) { in e1000_copper_link_mgp_setup()
3119 return ret_val; in e1000_copper_link_mgp_setup()
3134 int32_t ret_val; in e1000_copper_link_autoneg() local
3155 ret_val = e1000_phy_setup_autoneg(hw); in e1000_copper_link_autoneg()
3156 if (ret_val) { in e1000_copper_link_autoneg()
3158 return ret_val; in e1000_copper_link_autoneg()
3165 ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data); in e1000_copper_link_autoneg()
3166 if (ret_val) in e1000_copper_link_autoneg()
3167 return ret_val; in e1000_copper_link_autoneg()
3170 ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data); in e1000_copper_link_autoneg()
3171 if (ret_val) in e1000_copper_link_autoneg()
3172 return ret_val; in e1000_copper_link_autoneg()
3182 ret_val = e1000_wait_autoneg(hw); in e1000_copper_link_autoneg()
3183 if (ret_val) { in e1000_copper_link_autoneg()
3186 return ret_val; in e1000_copper_link_autoneg()
3210 int32_t ret_val; in e1000_copper_link_postconfig() local
3216 ret_val = e1000_config_mac_to_phy(hw); in e1000_copper_link_postconfig()
3217 if (ret_val) { in e1000_copper_link_postconfig()
3219 return ret_val; in e1000_copper_link_postconfig()
3222 ret_val = e1000_config_fc_after_link_up(hw); in e1000_copper_link_postconfig()
3223 if (ret_val) { in e1000_copper_link_postconfig()
3225 return ret_val; in e1000_copper_link_postconfig()
3238 int32_t ret_val; in e1000_setup_copper_link() local
3251 ret_val = e1000_write_kmrn_reg(hw, in e1000_setup_copper_link()
3253 if (ret_val) in e1000_setup_copper_link()
3254 return ret_val; in e1000_setup_copper_link()
3255 ret_val = e1000_read_kmrn_reg(hw, in e1000_setup_copper_link()
3257 if (ret_val) in e1000_setup_copper_link()
3258 return ret_val; in e1000_setup_copper_link()
3260 ret_val = e1000_write_kmrn_reg(hw, in e1000_setup_copper_link()
3262 if (ret_val) in e1000_setup_copper_link()
3263 return ret_val; in e1000_setup_copper_link()
3269 ret_val = e1000_copper_link_preconfig(hw); in e1000_setup_copper_link()
3270 if (ret_val) in e1000_setup_copper_link()
3271 return ret_val; in e1000_setup_copper_link()
3278 ret_val = e1000_write_kmrn_reg(hw, in e1000_setup_copper_link()
3280 if (ret_val) in e1000_setup_copper_link()
3281 return ret_val; in e1000_setup_copper_link()
3290 ret_val = e1000_copper_link_igp_setup(hw); in e1000_setup_copper_link()
3291 if (ret_val) in e1000_setup_copper_link()
3292 return ret_val; in e1000_setup_copper_link()
3295 ret_val = e1000_copper_link_mgp_setup(hw); in e1000_setup_copper_link()
3296 if (ret_val) in e1000_setup_copper_link()
3297 return ret_val; in e1000_setup_copper_link()
3299 ret_val = e1000_copper_link_ggp_setup(hw); in e1000_setup_copper_link()
3300 if (ret_val) in e1000_setup_copper_link()
3301 return ret_val; in e1000_setup_copper_link()
3307 ret_val = e1000_copper_link_autoneg(hw); in e1000_setup_copper_link()
3308 if (ret_val) in e1000_setup_copper_link()
3309 return ret_val; in e1000_setup_copper_link()
3315 ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data); in e1000_setup_copper_link()
3316 if (ret_val) in e1000_setup_copper_link()
3317 return ret_val; in e1000_setup_copper_link()
3318 ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data); in e1000_setup_copper_link()
3319 if (ret_val) in e1000_setup_copper_link()
3320 return ret_val; in e1000_setup_copper_link()
3324 ret_val = e1000_copper_link_postconfig(hw); in e1000_setup_copper_link()
3325 if (ret_val) in e1000_setup_copper_link()
3326 return ret_val; in e1000_setup_copper_link()
3346 int32_t ret_val; in e1000_phy_setup_autoneg() local
3353 ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, &mii_autoneg_adv_reg); in e1000_phy_setup_autoneg()
3354 if (ret_val) in e1000_phy_setup_autoneg()
3355 return ret_val; in e1000_phy_setup_autoneg()
3359 ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, in e1000_phy_setup_autoneg()
3361 if (ret_val) in e1000_phy_setup_autoneg()
3362 return ret_val; in e1000_phy_setup_autoneg()
3471 ret_val = e1000_write_phy_reg(hw, PHY_AUTONEG_ADV, mii_autoneg_adv_reg); in e1000_phy_setup_autoneg()
3472 if (ret_val) in e1000_phy_setup_autoneg()
3473 return ret_val; in e1000_phy_setup_autoneg()
3478 ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, in e1000_phy_setup_autoneg()
3480 if (ret_val) in e1000_phy_setup_autoneg()
3481 return ret_val; in e1000_phy_setup_autoneg()
3648 int32_t ret_val; in e1000_config_fc_after_link_up() local
3666 ret_val = e1000_force_mac_fc(hw); in e1000_config_fc_after_link_up()
3667 if (ret_val < 0) { in e1000_config_fc_after_link_up()
3669 return ret_val; in e1000_config_fc_after_link_up()
3838 ret_val = e1000_force_mac_fc(hw); in e1000_config_fc_after_link_up()
3839 if (ret_val < 0) { in e1000_config_fc_after_link_up()
3842 return ret_val; in e1000_config_fc_after_link_up()
3867 int32_t ret_val; in e1000_check_for_link() local
3926 ret_val = e1000_config_mac_to_phy(hw); in e1000_check_for_link()
3927 if (ret_val < 0) { in e1000_check_for_link()
3930 return ret_val; in e1000_check_for_link()
3938 ret_val = e1000_config_fc_after_link_up(hw); in e1000_check_for_link()
3939 if (ret_val < 0) { in e1000_check_for_link()
3941 return ret_val; in e1000_check_for_link()
4015 ret_val = e1000_config_fc_after_link_up(hw); in e1000_check_for_link()
4016 if (ret_val < 0) { in e1000_check_for_link()
4018 return ret_val; in e1000_check_for_link()
4044 int32_t ret_val = E1000_SUCCESS; in e1000_configure_kmrn_for_10_100() local
4051 ret_val = e1000_write_kmrn_reg(hw, in e1000_configure_kmrn_for_10_100()
4053 if (ret_val) in e1000_configure_kmrn_for_10_100()
4054 return ret_val; in e1000_configure_kmrn_for_10_100()
4062 ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); in e1000_configure_kmrn_for_10_100()
4064 if (ret_val) in e1000_configure_kmrn_for_10_100()
4065 return ret_val; in e1000_configure_kmrn_for_10_100()
4072 ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); in e1000_configure_kmrn_for_10_100()
4074 return ret_val; in e1000_configure_kmrn_for_10_100()
4080 int32_t ret_val = E1000_SUCCESS; in e1000_configure_kmrn_for_1000() local
4087 ret_val = e1000_write_kmrn_reg(hw, in e1000_configure_kmrn_for_1000()
4089 if (ret_val) in e1000_configure_kmrn_for_1000()
4090 return ret_val; in e1000_configure_kmrn_for_1000()
4098 ret_val = e1000_read_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); in e1000_configure_kmrn_for_1000()
4100 if (ret_val) in e1000_configure_kmrn_for_1000()
4101 return ret_val; in e1000_configure_kmrn_for_1000()
4104 ret_val = e1000_write_phy_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, reg_data); in e1000_configure_kmrn_for_1000()
4106 return ret_val; in e1000_configure_kmrn_for_1000()
4121 int32_t ret_val; in e1000_get_speed_and_duplex() local
4157 ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_EXP, &phy_data); in e1000_get_speed_and_duplex()
4158 if (ret_val) in e1000_get_speed_and_duplex()
4159 return ret_val; in e1000_get_speed_and_duplex()
4164 ret_val = e1000_read_phy_reg(hw, in e1000_get_speed_and_duplex()
4166 if (ret_val) in e1000_get_speed_and_duplex()
4167 return ret_val; in e1000_get_speed_and_duplex()
4179 ret_val = e1000_configure_kmrn_for_1000(hw); in e1000_get_speed_and_duplex()
4181 ret_val = e1000_configure_kmrn_for_10_100(hw, *duplex); in e1000_get_speed_and_duplex()
4182 if (ret_val) in e1000_get_speed_and_duplex()
4183 return ret_val; in e1000_get_speed_and_duplex()
4598 int32_t ret_val; in e1000_phy_hw_reset() local
4604 ret_val = e1000_check_phy_reset_block(hw); in e1000_phy_hw_reset()
4605 if (ret_val) in e1000_phy_hw_reset()
4664 ret_val = e1000_get_phy_cfg_done(hw); in e1000_phy_hw_reset()
4665 if (ret_val != E1000_SUCCESS) in e1000_phy_hw_reset()
4666 return ret_val; in e1000_phy_hw_reset()
4668 return ret_val; in e1000_phy_hw_reset()
4679 uint32_t ret_val; in e1000_phy_init_script() local
4688 ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data); in e1000_phy_init_script()
4734 if (!ret_val) in e1000_phy_init_script()
4788 int32_t ret_val; in e1000_phy_reset() local
4795 ret_val = e1000_check_phy_reset_block(hw); in e1000_phy_reset()
4796 if (ret_val) in e1000_phy_reset()
4805 ret_val = e1000_phy_hw_reset(hw); in e1000_phy_reset()
4806 if (ret_val) in e1000_phy_reset()
4807 return ret_val; in e1000_phy_reset()
4810 ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data); in e1000_phy_reset()
4811 if (ret_val) in e1000_phy_reset()
4812 return ret_val; in e1000_phy_reset()
4815 ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data); in e1000_phy_reset()
4816 if (ret_val) in e1000_phy_reset()
4817 return ret_val; in e1000_phy_reset()
4888 int32_t phy_init_status, ret_val; in e1000_detect_gig_phy() local
4914 ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high); in e1000_detect_gig_phy()
4915 if (ret_val) in e1000_detect_gig_phy()
4916 return ret_val; in e1000_detect_gig_phy()
4920 ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low); in e1000_detect_gig_phy()
4921 if (ret_val) in e1000_detect_gig_phy()
4922 return ret_val; in e1000_detect_gig_phy()
5443 int ret_val = 0; in _e1000_init() local
5445 ret_val = e1000_reset(hw, enetaddr); in _e1000_init()
5446 if (ret_val < 0) { in _e1000_init()
5447 if ((ret_val == -E1000_ERR_NOLINK) || in _e1000_init()
5448 (ret_val == -E1000_ERR_TIMEOUT)) { in _e1000_init()
5449 E1000_ERR(hw, "Valid Link not detected: %d\n", ret_val); in _e1000_init()
5453 return ret_val; in _e1000_init()
5672 int ret_val, i; in e1000_write_hwaddr() local
5681 ret_val = e1000_read_mac_addr_from_eeprom(hw, current_mac); in e1000_write_hwaddr()
5687 if (!ret_val && memcmp(current_mac, mac, 6) == 0) in e1000_write_hwaddr()
5693 ret_val = e1000_write_eeprom_srwr(hw, 0x0, 3, data); in e1000_write_hwaddr()
5695 if (!ret_val) in e1000_write_hwaddr()
5696 ret_val = e1000_update_eeprom_checksum_i210(hw); in e1000_write_hwaddr()
5698 return ret_val; in e1000_write_hwaddr()