Lines Matching refs:ret_val
41 s32 ret_val; in e1000_init_phy_params_80003es2lan() local
57 ret_val = e1000e_get_phy_id(hw); in e1000_init_phy_params_80003es2lan()
63 return ret_val; in e1000_init_phy_params_80003es2lan()
238 s32 ret_val; in e1000_acquire_nvm_80003es2lan() local
240 ret_val = e1000_acquire_swfw_sync_80003es2lan(hw, E1000_SWFW_EEP_SM); in e1000_acquire_nvm_80003es2lan()
241 if (ret_val) in e1000_acquire_nvm_80003es2lan()
242 return ret_val; in e1000_acquire_nvm_80003es2lan()
244 ret_val = e1000e_acquire_nvm(hw); in e1000_acquire_nvm_80003es2lan()
246 if (ret_val) in e1000_acquire_nvm_80003es2lan()
249 return ret_val; in e1000_acquire_nvm_80003es2lan()
342 s32 ret_val; in e1000_read_phy_reg_gg82563_80003es2lan() local
346 ret_val = e1000_acquire_phy_80003es2lan(hw); in e1000_read_phy_reg_gg82563_80003es2lan()
347 if (ret_val) in e1000_read_phy_reg_gg82563_80003es2lan()
348 return ret_val; in e1000_read_phy_reg_gg82563_80003es2lan()
361 ret_val = e1000e_write_phy_reg_mdic(hw, page_select, temp); in e1000_read_phy_reg_gg82563_80003es2lan()
362 if (ret_val) { in e1000_read_phy_reg_gg82563_80003es2lan()
364 return ret_val; in e1000_read_phy_reg_gg82563_80003es2lan()
375 ret_val = e1000e_read_phy_reg_mdic(hw, page_select, &temp); in e1000_read_phy_reg_gg82563_80003es2lan()
384 ret_val = e1000e_read_phy_reg_mdic(hw, in e1000_read_phy_reg_gg82563_80003es2lan()
390 ret_val = e1000e_read_phy_reg_mdic(hw, in e1000_read_phy_reg_gg82563_80003es2lan()
397 return ret_val; in e1000_read_phy_reg_gg82563_80003es2lan()
411 s32 ret_val; in e1000_write_phy_reg_gg82563_80003es2lan() local
415 ret_val = e1000_acquire_phy_80003es2lan(hw); in e1000_write_phy_reg_gg82563_80003es2lan()
416 if (ret_val) in e1000_write_phy_reg_gg82563_80003es2lan()
417 return ret_val; in e1000_write_phy_reg_gg82563_80003es2lan()
430 ret_val = e1000e_write_phy_reg_mdic(hw, page_select, temp); in e1000_write_phy_reg_gg82563_80003es2lan()
431 if (ret_val) { in e1000_write_phy_reg_gg82563_80003es2lan()
433 return ret_val; in e1000_write_phy_reg_gg82563_80003es2lan()
444 ret_val = e1000e_read_phy_reg_mdic(hw, page_select, &temp); in e1000_write_phy_reg_gg82563_80003es2lan()
453 ret_val = e1000e_write_phy_reg_mdic(hw, in e1000_write_phy_reg_gg82563_80003es2lan()
459 ret_val = e1000e_write_phy_reg_mdic(hw, in e1000_write_phy_reg_gg82563_80003es2lan()
466 return ret_val; in e1000_write_phy_reg_gg82563_80003es2lan()
522 s32 ret_val; in e1000_phy_force_speed_duplex_80003es2lan() local
529 ret_val = e1e_rphy(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); in e1000_phy_force_speed_duplex_80003es2lan()
530 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
531 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
534 ret_val = e1e_wphy(hw, GG82563_PHY_SPEC_CTRL, phy_data); in e1000_phy_force_speed_duplex_80003es2lan()
535 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
536 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
540 ret_val = e1e_rphy(hw, MII_BMCR, &phy_data); in e1000_phy_force_speed_duplex_80003es2lan()
541 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
542 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
549 ret_val = e1e_wphy(hw, MII_BMCR, phy_data); in e1000_phy_force_speed_duplex_80003es2lan()
550 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
551 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
558 ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, in e1000_phy_force_speed_duplex_80003es2lan()
560 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
561 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
567 ret_val = e1000e_phy_reset_dsp(hw); in e1000_phy_force_speed_duplex_80003es2lan()
568 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
569 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
573 ret_val = e1000e_phy_has_link_generic(hw, PHY_FORCE_LIMIT, in e1000_phy_force_speed_duplex_80003es2lan()
575 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
576 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
579 ret_val = e1e_rphy(hw, GG82563_PHY_MAC_SPEC_CTRL, &phy_data); in e1000_phy_force_speed_duplex_80003es2lan()
580 if (ret_val) in e1000_phy_force_speed_duplex_80003es2lan()
581 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
596 ret_val = e1e_wphy(hw, GG82563_PHY_MAC_SPEC_CTRL, phy_data); in e1000_phy_force_speed_duplex_80003es2lan()
598 return ret_val; in e1000_phy_force_speed_duplex_80003es2lan()
611 s32 ret_val; in e1000_get_cable_length_80003es2lan() local
614 ret_val = e1e_rphy(hw, GG82563_PHY_DSP_DISTANCE, &phy_data); in e1000_get_cable_length_80003es2lan()
615 if (ret_val) in e1000_get_cable_length_80003es2lan()
616 return ret_val; in e1000_get_cable_length_80003es2lan()
642 s32 ret_val; in e1000_get_link_up_info_80003es2lan() local
645 ret_val = e1000e_get_speed_and_duplex_copper(hw, speed, duplex); in e1000_get_link_up_info_80003es2lan()
648 ret_val = e1000e_get_speed_and_duplex_fiber_serdes(hw, in e1000_get_link_up_info_80003es2lan()
653 return ret_val; in e1000_get_link_up_info_80003es2lan()
665 s32 ret_val; in e1000_reset_hw_80003es2lan() local
671 ret_val = e1000e_disable_pcie_master(hw); in e1000_reset_hw_80003es2lan()
672 if (ret_val) in e1000_reset_hw_80003es2lan()
686 ret_val = e1000_acquire_phy_80003es2lan(hw); in e1000_reset_hw_80003es2lan()
687 if (ret_val) in e1000_reset_hw_80003es2lan()
688 return ret_val; in e1000_reset_hw_80003es2lan()
695 ret_val = in e1000_reset_hw_80003es2lan()
698 if (!ret_val) { in e1000_reset_hw_80003es2lan()
700 ret_val = e1000_write_kmrn_reg_80003es2lan(hw, in e1000_reset_hw_80003es2lan()
703 if (ret_val) in e1000_reset_hw_80003es2lan()
709 ret_val = e1000e_get_auto_rd_done(hw); in e1000_reset_hw_80003es2lan()
710 if (ret_val) in e1000_reset_hw_80003es2lan()
712 return ret_val; in e1000_reset_hw_80003es2lan()
731 s32 ret_val; in e1000_init_hw_80003es2lan() local
738 ret_val = mac->ops.id_led_init(hw); in e1000_init_hw_80003es2lan()
740 if (ret_val) in e1000_init_hw_80003es2lan()
756 ret_val = mac->ops.setup_link(hw); in e1000_init_hw_80003es2lan()
757 if (ret_val) in e1000_init_hw_80003es2lan()
758 return ret_val; in e1000_init_hw_80003es2lan()
761 ret_val = in e1000_init_hw_80003es2lan()
764 if (!ret_val) { in e1000_init_hw_80003es2lan()
766 ret_val = e1000_write_kmrn_reg_80003es2lan(hw, in e1000_init_hw_80003es2lan()
769 if (ret_val) in e1000_init_hw_80003es2lan()
811 ret_val = in e1000_init_hw_80003es2lan()
814 if (!ret_val) { in e1000_init_hw_80003es2lan()
827 return ret_val; in e1000_init_hw_80003es2lan()
882 s32 ret_val; in e1000_copper_link_setup_gg82563_80003es2lan() local
886 ret_val = e1e_rphy(hw, GG82563_PHY_MAC_SPEC_CTRL, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
887 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
888 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
894 ret_val = e1e_wphy(hw, GG82563_PHY_MAC_SPEC_CTRL, data); in e1000_copper_link_setup_gg82563_80003es2lan()
895 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
896 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
905 ret_val = e1e_rphy(hw, GG82563_PHY_SPEC_CTRL, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
906 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
907 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
934 ret_val = e1e_wphy(hw, GG82563_PHY_SPEC_CTRL, data); in e1000_copper_link_setup_gg82563_80003es2lan()
935 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
936 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
939 ret_val = hw->phy.ops.commit(hw); in e1000_copper_link_setup_gg82563_80003es2lan()
940 if (ret_val) { in e1000_copper_link_setup_gg82563_80003es2lan()
942 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
949 ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); in e1000_copper_link_setup_gg82563_80003es2lan()
950 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
951 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
954 ret_val = e1000_read_kmrn_reg_80003es2lan(hw, reg, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
955 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
956 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
958 ret_val = e1000_write_kmrn_reg_80003es2lan(hw, reg, data); in e1000_copper_link_setup_gg82563_80003es2lan()
959 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
960 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
962 ret_val = e1e_rphy(hw, GG82563_PHY_SPEC_CTRL_2, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
963 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
964 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
967 ret_val = e1e_wphy(hw, GG82563_PHY_SPEC_CTRL_2, data); in e1000_copper_link_setup_gg82563_80003es2lan()
968 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
969 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
975 ret_val = e1e_rphy(hw, GG82563_PHY_PWR_MGMT_CTRL, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
976 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
977 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
986 ret_val = e1e_wphy(hw, GG82563_PHY_PWR_MGMT_CTRL, data); in e1000_copper_link_setup_gg82563_80003es2lan()
987 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
988 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
990 ret_val = e1e_rphy(hw, GG82563_PHY_KMRN_MODE_CTRL, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
991 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
992 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
995 ret_val = e1e_wphy(hw, GG82563_PHY_KMRN_MODE_CTRL, data); in e1000_copper_link_setup_gg82563_80003es2lan()
996 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
997 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
1003 ret_val = e1e_rphy(hw, GG82563_PHY_INBAND_CTRL, &data); in e1000_copper_link_setup_gg82563_80003es2lan()
1004 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
1005 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
1008 ret_val = e1e_wphy(hw, GG82563_PHY_INBAND_CTRL, data); in e1000_copper_link_setup_gg82563_80003es2lan()
1009 if (ret_val) in e1000_copper_link_setup_gg82563_80003es2lan()
1010 return ret_val; in e1000_copper_link_setup_gg82563_80003es2lan()
1025 s32 ret_val; in e1000_setup_copper_link_80003es2lan() local
1041 ret_val = e1000_write_kmrn_reg_80003es2lan(hw, 4, 0xFFFF); in e1000_setup_copper_link_80003es2lan()
1042 if (ret_val) in e1000_setup_copper_link_80003es2lan()
1043 return ret_val; in e1000_setup_copper_link_80003es2lan()
1044 ret_val = e1000_read_kmrn_reg_80003es2lan(hw, 9, ®_data); in e1000_setup_copper_link_80003es2lan()
1045 if (ret_val) in e1000_setup_copper_link_80003es2lan()
1046 return ret_val; in e1000_setup_copper_link_80003es2lan()
1048 ret_val = e1000_write_kmrn_reg_80003es2lan(hw, 9, reg_data); in e1000_setup_copper_link_80003es2lan()
1049 if (ret_val) in e1000_setup_copper_link_80003es2lan()
1050 return ret_val; in e1000_setup_copper_link_80003es2lan()
1051 ret_val = in e1000_setup_copper_link_80003es2lan()
1055 if (ret_val) in e1000_setup_copper_link_80003es2lan()
1056 return ret_val; in e1000_setup_copper_link_80003es2lan()
1058 ret_val = in e1000_setup_copper_link_80003es2lan()
1062 if (ret_val) in e1000_setup_copper_link_80003es2lan()
1063 return ret_val; in e1000_setup_copper_link_80003es2lan()
1065 ret_val = e1000_copper_link_setup_gg82563_80003es2lan(hw); in e1000_setup_copper_link_80003es2lan()
1066 if (ret_val) in e1000_setup_copper_link_80003es2lan()
1067 return ret_val; in e1000_setup_copper_link_80003es2lan()
1081 s32 ret_val = 0; in e1000_cfg_on_link_up_80003es2lan() local
1086 ret_val = e1000e_get_speed_and_duplex_copper(hw, &speed, in e1000_cfg_on_link_up_80003es2lan()
1088 if (ret_val) in e1000_cfg_on_link_up_80003es2lan()
1089 return ret_val; in e1000_cfg_on_link_up_80003es2lan()
1092 ret_val = e1000_cfg_kmrn_1000_80003es2lan(hw); in e1000_cfg_on_link_up_80003es2lan()
1094 ret_val = e1000_cfg_kmrn_10_100_80003es2lan(hw, duplex); in e1000_cfg_on_link_up_80003es2lan()
1097 return ret_val; in e1000_cfg_on_link_up_80003es2lan()
1110 s32 ret_val; in e1000_cfg_kmrn_10_100_80003es2lan() local
1116 ret_val = in e1000_cfg_kmrn_10_100_80003es2lan()
1120 if (ret_val) in e1000_cfg_kmrn_10_100_80003es2lan()
1121 return ret_val; in e1000_cfg_kmrn_10_100_80003es2lan()
1130 ret_val = e1e_rphy(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); in e1000_cfg_kmrn_10_100_80003es2lan()
1131 if (ret_val) in e1000_cfg_kmrn_10_100_80003es2lan()
1132 return ret_val; in e1000_cfg_kmrn_10_100_80003es2lan()
1134 ret_val = e1e_rphy(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data2); in e1000_cfg_kmrn_10_100_80003es2lan()
1135 if (ret_val) in e1000_cfg_kmrn_10_100_80003es2lan()
1136 return ret_val; in e1000_cfg_kmrn_10_100_80003es2lan()
1157 s32 ret_val; in e1000_cfg_kmrn_1000_80003es2lan() local
1163 ret_val = in e1000_cfg_kmrn_1000_80003es2lan()
1167 if (ret_val) in e1000_cfg_kmrn_1000_80003es2lan()
1168 return ret_val; in e1000_cfg_kmrn_1000_80003es2lan()
1177 ret_val = e1e_rphy(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); in e1000_cfg_kmrn_1000_80003es2lan()
1178 if (ret_val) in e1000_cfg_kmrn_1000_80003es2lan()
1179 return ret_val; in e1000_cfg_kmrn_1000_80003es2lan()
1181 ret_val = e1e_rphy(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data2); in e1000_cfg_kmrn_1000_80003es2lan()
1182 if (ret_val) in e1000_cfg_kmrn_1000_80003es2lan()
1183 return ret_val; in e1000_cfg_kmrn_1000_80003es2lan()
1206 s32 ret_val; in e1000_read_kmrn_reg_80003es2lan() local
1208 ret_val = e1000_acquire_mac_csr_80003es2lan(hw); in e1000_read_kmrn_reg_80003es2lan()
1209 if (ret_val) in e1000_read_kmrn_reg_80003es2lan()
1210 return ret_val; in e1000_read_kmrn_reg_80003es2lan()
1224 return ret_val; in e1000_read_kmrn_reg_80003es2lan()
1241 s32 ret_val; in e1000_write_kmrn_reg_80003es2lan() local
1243 ret_val = e1000_acquire_mac_csr_80003es2lan(hw); in e1000_write_kmrn_reg_80003es2lan()
1244 if (ret_val) in e1000_write_kmrn_reg_80003es2lan()
1245 return ret_val; in e1000_write_kmrn_reg_80003es2lan()
1255 return ret_val; in e1000_write_kmrn_reg_80003es2lan()
1264 s32 ret_val; in e1000_read_mac_addr_80003es2lan() local
1270 ret_val = e1000_check_alt_mac_addr_generic(hw); in e1000_read_mac_addr_80003es2lan()
1271 if (ret_val) in e1000_read_mac_addr_80003es2lan()
1272 return ret_val; in e1000_read_mac_addr_80003es2lan()