Lines Matching refs:ret_val

180 	s32 ret_val = 0;  in e1000_phy_is_accessible_pchlan()  local
185 ret_val = e1e_rphy_locked(hw, MII_PHYSID1, &phy_reg); in e1000_phy_is_accessible_pchlan()
186 if (ret_val || (phy_reg == 0xFFFF)) in e1000_phy_is_accessible_pchlan()
190 ret_val = e1e_rphy_locked(hw, MII_PHYSID2, &phy_reg); in e1000_phy_is_accessible_pchlan()
191 if (ret_val || (phy_reg == 0xFFFF)) { in e1000_phy_is_accessible_pchlan()
213 ret_val = e1000_set_mdio_slow_mode_hv(hw); in e1000_phy_is_accessible_pchlan()
214 if (!ret_val) in e1000_phy_is_accessible_pchlan()
215 ret_val = e1000e_get_phy_id(hw); in e1000_phy_is_accessible_pchlan()
219 if (ret_val) in e1000_phy_is_accessible_pchlan()
299 s32 ret_val; in e1000_init_phy_workarounds_pchlan() local
310 ret_val = e1000_disable_ulp_lpt_lp(hw, true); in e1000_init_phy_workarounds_pchlan()
311 if (ret_val) in e1000_init_phy_workarounds_pchlan()
314 ret_val = hw->phy.ops.acquire(hw); in e1000_init_phy_workarounds_pchlan()
315 if (ret_val) { in e1000_init_phy_workarounds_pchlan()
368 ret_val = -E1000_ERR_PHY; in e1000_init_phy_workarounds_pchlan()
388 ret_val = -E1000_ERR_PHY; in e1000_init_phy_workarounds_pchlan()
398 if (!ret_val) { in e1000_init_phy_workarounds_pchlan()
411 ret_val = e1000e_phy_hw_reset_generic(hw); in e1000_init_phy_workarounds_pchlan()
412 if (ret_val) in e1000_init_phy_workarounds_pchlan()
421 ret_val = hw->phy.ops.check_reset_block(hw); in e1000_init_phy_workarounds_pchlan()
422 if (ret_val) in e1000_init_phy_workarounds_pchlan()
434 return ret_val; in e1000_init_phy_workarounds_pchlan()
446 s32 ret_val; in e1000_init_phy_params_pchlan() local
471 ret_val = e1000_init_phy_workarounds_pchlan(hw); in e1000_init_phy_params_pchlan()
472 if (ret_val) in e1000_init_phy_params_pchlan()
473 return ret_val; in e1000_init_phy_params_pchlan()
478 ret_val = e1000e_get_phy_id(hw); in e1000_init_phy_params_pchlan()
479 if (ret_val) in e1000_init_phy_params_pchlan()
480 return ret_val; in e1000_init_phy_params_pchlan()
497 ret_val = e1000_set_mdio_slow_mode_hv(hw); in e1000_init_phy_params_pchlan()
498 if (ret_val) in e1000_init_phy_params_pchlan()
499 return ret_val; in e1000_init_phy_params_pchlan()
500 ret_val = e1000e_get_phy_id(hw); in e1000_init_phy_params_pchlan()
501 if (ret_val) in e1000_init_phy_params_pchlan()
502 return ret_val; in e1000_init_phy_params_pchlan()
525 ret_val = -E1000_ERR_PHY; in e1000_init_phy_params_pchlan()
529 return ret_val; in e1000_init_phy_params_pchlan()
541 s32 ret_val; in e1000_init_phy_params_ich8lan() local
553 ret_val = e1000e_determine_phy_address(hw); in e1000_init_phy_params_ich8lan()
554 if (ret_val) { in e1000_init_phy_params_ich8lan()
557 ret_val = e1000e_determine_phy_address(hw); in e1000_init_phy_params_ich8lan()
558 if (ret_val) { in e1000_init_phy_params_ich8lan()
560 return ret_val; in e1000_init_phy_params_ich8lan()
568 ret_val = e1000e_get_phy_id(hw); in e1000_init_phy_params_ich8lan()
569 if (ret_val) in e1000_init_phy_params_ich8lan()
570 return ret_val; in e1000_init_phy_params_ich8lan()
786 s32 ret_val; in __e1000_access_emi_reg_locked() local
788 ret_val = e1e_wphy_locked(hw, I82579_EMI_ADDR, address); in __e1000_access_emi_reg_locked()
789 if (ret_val) in __e1000_access_emi_reg_locked()
790 return ret_val; in __e1000_access_emi_reg_locked()
793 ret_val = e1e_rphy_locked(hw, I82579_EMI_DATA, data); in __e1000_access_emi_reg_locked()
795 ret_val = e1e_wphy_locked(hw, I82579_EMI_DATA, *data); in __e1000_access_emi_reg_locked()
797 return ret_val; in __e1000_access_emi_reg_locked()
843 s32 ret_val; in e1000_set_eee_pchlan() local
861 ret_val = hw->phy.ops.acquire(hw); in e1000_set_eee_pchlan()
862 if (ret_val) in e1000_set_eee_pchlan()
863 return ret_val; in e1000_set_eee_pchlan()
865 ret_val = e1e_rphy_locked(hw, I82579_LPI_CTRL, &lpi_ctrl); in e1000_set_eee_pchlan()
866 if (ret_val) in e1000_set_eee_pchlan()
875 ret_val = e1000_read_emi_reg_locked(hw, lpa, in e1000_set_eee_pchlan()
877 if (ret_val) in e1000_set_eee_pchlan()
881 ret_val = e1000_read_emi_reg_locked(hw, adv_addr, &adv); in e1000_set_eee_pchlan()
882 if (ret_val) in e1000_set_eee_pchlan()
906 ret_val = e1000_read_emi_reg_locked(hw, I82579_LPI_PLL_SHUT, in e1000_set_eee_pchlan()
908 if (ret_val) in e1000_set_eee_pchlan()
912 ret_val = e1000_write_emi_reg_locked(hw, I82579_LPI_PLL_SHUT, in e1000_set_eee_pchlan()
917 ret_val = e1000_read_emi_reg_locked(hw, pcs_status, &data); in e1000_set_eee_pchlan()
918 if (ret_val) in e1000_set_eee_pchlan()
921 ret_val = e1e_wphy_locked(hw, I82579_LPI_CTRL, lpi_ctrl); in e1000_set_eee_pchlan()
925 return ret_val; in e1000_set_eee_pchlan()
943 s32 ret_val = 0; in e1000_k1_workaround_lpt_lp() local
947 ret_val = hw->phy.ops.acquire(hw); in e1000_k1_workaround_lpt_lp()
948 if (ret_val) in e1000_k1_workaround_lpt_lp()
949 return ret_val; in e1000_k1_workaround_lpt_lp()
951 ret_val = in e1000_k1_workaround_lpt_lp()
954 if (ret_val) in e1000_k1_workaround_lpt_lp()
957 ret_val = in e1000_k1_workaround_lpt_lp()
962 if (ret_val) in e1000_k1_workaround_lpt_lp()
969 ret_val = in e1000_k1_workaround_lpt_lp()
984 ret_val = e1e_rphy(hw, I217_INBAND_CTRL, &reg); in e1000_k1_workaround_lpt_lp()
985 if (ret_val) in e1000_k1_workaround_lpt_lp()
986 return ret_val; in e1000_k1_workaround_lpt_lp()
1006 ret_val = e1e_wphy(hw, I217_INBAND_CTRL, reg); in e1000_k1_workaround_lpt_lp()
1007 if (ret_val) in e1000_k1_workaround_lpt_lp()
1008 return ret_val; in e1000_k1_workaround_lpt_lp()
1014 return ret_val; in e1000_k1_workaround_lpt_lp()
1124 s32 ret_val; in e1000e_force_smbus() local
1132 ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &smb_ctrl); in e1000e_force_smbus()
1133 if (ret_val) { in e1000e_force_smbus()
1135 return ret_val; in e1000e_force_smbus()
1164 s32 ret_val = 0; in e1000_enable_ulp_lpt_lp() local
1204 ret_val = hw->phy.ops.acquire(hw); in e1000_enable_ulp_lpt_lp()
1205 if (ret_val) in e1000_enable_ulp_lpt_lp()
1208 ret_val = e1000e_force_smbus(hw); in e1000_enable_ulp_lpt_lp()
1209 if (ret_val) { in e1000_enable_ulp_lpt_lp()
1210 e_dbg("Failed to force SMBUS: %d\n", ret_val); in e1000_enable_ulp_lpt_lp()
1218 ret_val = e1000_read_phy_reg_hv_locked(hw, HV_OEM_BITS, in e1000_enable_ulp_lpt_lp()
1220 if (ret_val) in e1000_enable_ulp_lpt_lp()
1226 ret_val = e1000_write_phy_reg_hv_locked(hw, HV_OEM_BITS, in e1000_enable_ulp_lpt_lp()
1229 if (ret_val) in e1000_enable_ulp_lpt_lp()
1236 ret_val = e1000_read_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, &phy_reg); in e1000_enable_ulp_lpt_lp()
1237 if (ret_val) in e1000_enable_ulp_lpt_lp()
1267 ret_val = e1000_write_phy_reg_hv_locked(hw, HV_OEM_BITS, in e1000_enable_ulp_lpt_lp()
1269 if (ret_val) in e1000_enable_ulp_lpt_lp()
1276 if (ret_val) in e1000_enable_ulp_lpt_lp()
1277 e_dbg("Error in ULP enable flow: %d\n", ret_val); in e1000_enable_ulp_lpt_lp()
1281 return ret_val; in e1000_enable_ulp_lpt_lp()
1301 s32 ret_val = 0; in e1000_disable_ulp_lpt_lp() local
1332 ret_val = -E1000_ERR_PHY; in e1000_disable_ulp_lpt_lp()
1361 ret_val = hw->phy.ops.acquire(hw); in e1000_disable_ulp_lpt_lp()
1362 if (ret_val) in e1000_disable_ulp_lpt_lp()
1375 ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &phy_reg); in e1000_disable_ulp_lpt_lp()
1376 if (ret_val) { in e1000_disable_ulp_lpt_lp()
1386 ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, in e1000_disable_ulp_lpt_lp()
1388 if (ret_val) in e1000_disable_ulp_lpt_lp()
1404 ret_val = e1000_read_phy_reg_hv_locked(hw, HV_PM_CTRL, &phy_reg); in e1000_disable_ulp_lpt_lp()
1405 if (ret_val) in e1000_disable_ulp_lpt_lp()
1411 ret_val = e1000_read_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, &phy_reg); in e1000_disable_ulp_lpt_lp()
1412 if (ret_val) in e1000_disable_ulp_lpt_lp()
1440 if (ret_val) in e1000_disable_ulp_lpt_lp()
1441 e_dbg("Error in ULP disable flow: %d\n", ret_val); in e1000_disable_ulp_lpt_lp()
1445 return ret_val; in e1000_disable_ulp_lpt_lp()
1459 s32 ret_val, tipg_reg = 0; in e1000_check_for_copper_link_ich8lan() local
1477 ret_val = e1000e_phy_has_link_generic(hw, 1, 0, &link); in e1000_check_for_copper_link_ich8lan()
1478 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1482 ret_val = e1000_k1_gig_workaround_hv(hw, link); in e1000_check_for_copper_link_ich8lan()
1483 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1515 ret_val = hw->phy.ops.acquire(hw); in e1000_check_for_copper_link_ich8lan()
1516 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1523 ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val); in e1000_check_for_copper_link_ich8lan()
1548 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1556 ret_val = hw->phy.ops.acquire(hw); in e1000_check_for_copper_link_ich8lan()
1557 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1560 ret_val = e1e_rphy_locked(hw, in e1000_check_for_copper_link_ich8lan()
1563 if (ret_val) { in e1000_check_for_copper_link_ich8lan()
1572 ret_val = in e1000_check_for_copper_link_ich8lan()
1578 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1581 ret_val = hw->phy.ops.acquire(hw); in e1000_check_for_copper_link_ich8lan()
1582 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1585 ret_val = e1e_wphy_locked(hw, in e1000_check_for_copper_link_ich8lan()
1589 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1615 ret_val = e1000_k1_workaround_lpt_lp(hw, link); in e1000_check_for_copper_link_ich8lan()
1616 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1623 ret_val = e1000_platform_pm_pch_lpt(hw, link); in e1000_check_for_copper_link_ich8lan()
1624 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1652 ret_val = e1000_k1_workaround_lv(hw); in e1000_check_for_copper_link_ich8lan()
1653 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1654 return ret_val; in e1000_check_for_copper_link_ich8lan()
1658 ret_val = e1000_link_stall_workaround_hv(hw); in e1000_check_for_copper_link_ich8lan()
1659 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1660 return ret_val; in e1000_check_for_copper_link_ich8lan()
1687 ret_val = e1000_set_eee_pchlan(hw); in e1000_check_for_copper_link_ich8lan()
1688 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1689 return ret_val; in e1000_check_for_copper_link_ich8lan()
1709 ret_val = e1000e_config_fc_after_link_up(hw); in e1000_check_for_copper_link_ich8lan()
1710 if (ret_val) in e1000_check_for_copper_link_ich8lan()
1713 return ret_val; in e1000_check_for_copper_link_ich8lan()
1717 return ret_val; in e1000_check_for_copper_link_ich8lan()
1818 s32 ret_val = 0; in e1000_acquire_swflag_ich8lan() local
1837 ret_val = -E1000_ERR_CONFIG; in e1000_acquire_swflag_ich8lan()
1860 ret_val = -E1000_ERR_CONFIG; in e1000_acquire_swflag_ich8lan()
1865 if (ret_val) in e1000_acquire_swflag_ich8lan()
1868 return ret_val; in e1000_acquire_swflag_ich8lan()
1969 s32 ret_val; in e1000_rar_set_pch2lan() local
1971 ret_val = e1000_acquire_swflag_ich8lan(hw); in e1000_rar_set_pch2lan()
1972 if (ret_val) in e1000_rar_set_pch2lan()
2080 s32 ret_val; in e1000_rar_set_pch_lpt() local
2082 ret_val = e1000_acquire_swflag_ich8lan(hw); in e1000_rar_set_pch_lpt()
2084 if (ret_val) in e1000_rar_set_pch_lpt()
2137 s32 ret_val; in e1000_write_smbus_addr() local
2141 ret_val = e1000_read_phy_reg_hv_locked(hw, HV_SMB_ADDR, &phy_data); in e1000_write_smbus_addr()
2142 if (ret_val) in e1000_write_smbus_addr()
2143 return ret_val; in e1000_write_smbus_addr()
2176 s32 ret_val = 0; in e1000_sw_lcd_config_ich8lan() local
2188 return ret_val; in e1000_sw_lcd_config_ich8lan()
2210 return ret_val; in e1000_sw_lcd_config_ich8lan()
2213 ret_val = hw->phy.ops.acquire(hw); in e1000_sw_lcd_config_ich8lan()
2214 if (ret_val) in e1000_sw_lcd_config_ich8lan()
2215 return ret_val; in e1000_sw_lcd_config_ich8lan()
2246 ret_val = e1000_write_smbus_addr(hw); in e1000_sw_lcd_config_ich8lan()
2247 if (ret_val) in e1000_sw_lcd_config_ich8lan()
2251 ret_val = e1000_write_phy_reg_hv_locked(hw, HV_LED_CONFIG, in e1000_sw_lcd_config_ich8lan()
2253 if (ret_val) in e1000_sw_lcd_config_ich8lan()
2263 ret_val = e1000_read_nvm(hw, (word_addr + i * 2), 1, &reg_data); in e1000_sw_lcd_config_ich8lan()
2264 if (ret_val) in e1000_sw_lcd_config_ich8lan()
2267 ret_val = e1000_read_nvm(hw, (word_addr + i * 2 + 1), in e1000_sw_lcd_config_ich8lan()
2269 if (ret_val) in e1000_sw_lcd_config_ich8lan()
2281 ret_val = e1e_wphy_locked(hw, (u32)reg_addr, reg_data); in e1000_sw_lcd_config_ich8lan()
2282 if (ret_val) in e1000_sw_lcd_config_ich8lan()
2288 return ret_val; in e1000_sw_lcd_config_ich8lan()
2303 s32 ret_val = 0; in e1000_k1_gig_workaround_hv() local
2311 ret_val = hw->phy.ops.acquire(hw); in e1000_k1_gig_workaround_hv()
2312 if (ret_val) in e1000_k1_gig_workaround_hv()
2313 return ret_val; in e1000_k1_gig_workaround_hv()
2318 ret_val = e1e_rphy_locked(hw, BM_CS_STATUS, in e1000_k1_gig_workaround_hv()
2320 if (ret_val) in e1000_k1_gig_workaround_hv()
2334 ret_val = e1e_rphy_locked(hw, HV_M_STATUS, &status_reg); in e1000_k1_gig_workaround_hv()
2335 if (ret_val) in e1000_k1_gig_workaround_hv()
2349 ret_val = e1e_wphy_locked(hw, PHY_REG(770, 19), 0x0100); in e1000_k1_gig_workaround_hv()
2350 if (ret_val) in e1000_k1_gig_workaround_hv()
2355 ret_val = e1e_wphy_locked(hw, PHY_REG(770, 19), 0x4100); in e1000_k1_gig_workaround_hv()
2356 if (ret_val) in e1000_k1_gig_workaround_hv()
2360 ret_val = e1000_configure_k1_ich8lan(hw, k1_enable); in e1000_k1_gig_workaround_hv()
2365 return ret_val; in e1000_k1_gig_workaround_hv()
2380 s32 ret_val; in e1000_configure_k1_ich8lan() local
2386 ret_val = e1000e_read_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K1_CONFIG, in e1000_configure_k1_ich8lan()
2388 if (ret_val) in e1000_configure_k1_ich8lan()
2389 return ret_val; in e1000_configure_k1_ich8lan()
2396 ret_val = e1000e_write_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K1_CONFIG, in e1000_configure_k1_ich8lan()
2398 if (ret_val) in e1000_configure_k1_ich8lan()
2399 return ret_val; in e1000_configure_k1_ich8lan()
2431 s32 ret_val = 0; in e1000_oem_bits_config_ich8lan() local
2436 return ret_val; in e1000_oem_bits_config_ich8lan()
2438 ret_val = hw->phy.ops.acquire(hw); in e1000_oem_bits_config_ich8lan()
2439 if (ret_val) in e1000_oem_bits_config_ich8lan()
2440 return ret_val; in e1000_oem_bits_config_ich8lan()
2454 ret_val = e1e_rphy_locked(hw, HV_OEM_BITS, &oem_reg); in e1000_oem_bits_config_ich8lan()
2455 if (ret_val) in e1000_oem_bits_config_ich8lan()
2481 ret_val = e1e_wphy_locked(hw, HV_OEM_BITS, oem_reg); in e1000_oem_bits_config_ich8lan()
2486 return ret_val; in e1000_oem_bits_config_ich8lan()
2495 s32 ret_val; in e1000_set_mdio_slow_mode_hv() local
2498 ret_val = e1e_rphy(hw, HV_KMRN_MODE_CTRL, &data); in e1000_set_mdio_slow_mode_hv()
2499 if (ret_val) in e1000_set_mdio_slow_mode_hv()
2500 return ret_val; in e1000_set_mdio_slow_mode_hv()
2504 ret_val = e1e_wphy(hw, HV_KMRN_MODE_CTRL, data); in e1000_set_mdio_slow_mode_hv()
2506 return ret_val; in e1000_set_mdio_slow_mode_hv()
2517 s32 ret_val = 0; in e1000_hv_phy_workarounds_ich8lan() local
2525 ret_val = e1000_set_mdio_slow_mode_hv(hw); in e1000_hv_phy_workarounds_ich8lan()
2526 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2527 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2534 ret_val = e1e_wphy(hw, PHY_REG(769, 25), 0x4431); in e1000_hv_phy_workarounds_ich8lan()
2535 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2536 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2539 ret_val = e1e_wphy(hw, HV_KMRN_FIFO_CTRLSTA, 0xA204); in e1000_hv_phy_workarounds_ich8lan()
2540 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2541 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2550 ret_val = e1e_wphy(hw, MII_BMCR, 0x3140); in e1000_hv_phy_workarounds_ich8lan()
2551 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2552 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2557 ret_val = hw->phy.ops.acquire(hw); in e1000_hv_phy_workarounds_ich8lan()
2558 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2559 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2562 ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, 0); in e1000_hv_phy_workarounds_ich8lan()
2564 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2565 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2570 ret_val = e1000_k1_gig_workaround_hv(hw, true); in e1000_hv_phy_workarounds_ich8lan()
2571 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2572 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2575 ret_val = hw->phy.ops.acquire(hw); in e1000_hv_phy_workarounds_ich8lan()
2576 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2577 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2578 ret_val = e1e_rphy_locked(hw, BM_PORT_GEN_CFG, &phy_data); in e1000_hv_phy_workarounds_ich8lan()
2579 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2581 ret_val = e1e_wphy_locked(hw, BM_PORT_GEN_CFG, phy_data & 0x00FF); in e1000_hv_phy_workarounds_ich8lan()
2582 if (ret_val) in e1000_hv_phy_workarounds_ich8lan()
2586 ret_val = e1000_write_emi_reg_locked(hw, I82577_MSE_THRESHOLD, 0x0034); in e1000_hv_phy_workarounds_ich8lan()
2590 return ret_val; in e1000_hv_phy_workarounds_ich8lan()
2601 s32 ret_val; in e1000_copy_rx_addrs_to_phy_ich8lan() local
2603 ret_val = hw->phy.ops.acquire(hw); in e1000_copy_rx_addrs_to_phy_ich8lan()
2604 if (ret_val) in e1000_copy_rx_addrs_to_phy_ich8lan()
2606 ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg); in e1000_copy_rx_addrs_to_phy_ich8lan()
2607 if (ret_val) in e1000_copy_rx_addrs_to_phy_ich8lan()
2639 s32 ret_val = 0; in e1000_lv_jumbo_workaround_ich8lan() local
2649 ret_val = e1e_wphy(hw, PHY_REG(769, 20), phy_reg | BIT(14)); in e1000_lv_jumbo_workaround_ich8lan()
2650 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2651 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2688 ret_val = e1000e_read_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2691 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2692 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2693 ret_val = e1000e_write_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2696 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2697 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2698 ret_val = e1000e_read_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2701 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2702 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2705 ret_val = e1000e_write_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2708 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2709 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2715 ret_val = e1e_wphy(hw, PHY_REG(769, 23), data); in e1000_lv_jumbo_workaround_ich8lan()
2716 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2717 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2720 ret_val = e1e_wphy(hw, PHY_REG(769, 16), data); in e1000_lv_jumbo_workaround_ich8lan()
2721 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2722 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2726 ret_val = e1e_wphy(hw, PHY_REG(776, 20), data); in e1000_lv_jumbo_workaround_ich8lan()
2727 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2728 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2729 ret_val = e1e_wphy(hw, PHY_REG(776, 23), 0xF100); in e1000_lv_jumbo_workaround_ich8lan()
2730 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2731 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2733 ret_val = e1e_wphy(hw, HV_PM_CTRL, data | BIT(10)); in e1000_lv_jumbo_workaround_ich8lan()
2734 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2735 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2746 ret_val = e1000e_read_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2749 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2750 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2751 ret_val = e1000e_write_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2754 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2755 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2756 ret_val = e1000e_read_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2759 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2760 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2763 ret_val = e1000e_write_kmrn_reg(hw, in e1000_lv_jumbo_workaround_ich8lan()
2766 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2767 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2772 ret_val = e1e_wphy(hw, PHY_REG(769, 23), data); in e1000_lv_jumbo_workaround_ich8lan()
2773 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2774 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2777 ret_val = e1e_wphy(hw, PHY_REG(769, 16), data); in e1000_lv_jumbo_workaround_ich8lan()
2778 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2779 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2783 ret_val = e1e_wphy(hw, PHY_REG(776, 20), data); in e1000_lv_jumbo_workaround_ich8lan()
2784 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2785 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2786 ret_val = e1e_wphy(hw, PHY_REG(776, 23), 0x7E00); in e1000_lv_jumbo_workaround_ich8lan()
2787 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2788 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2790 ret_val = e1e_wphy(hw, HV_PM_CTRL, data & ~BIT(10)); in e1000_lv_jumbo_workaround_ich8lan()
2791 if (ret_val) in e1000_lv_jumbo_workaround_ich8lan()
2792 return ret_val; in e1000_lv_jumbo_workaround_ich8lan()
2807 s32 ret_val = 0; in e1000_lv_phy_workarounds_ich8lan() local
2813 ret_val = e1000_set_mdio_slow_mode_hv(hw); in e1000_lv_phy_workarounds_ich8lan()
2814 if (ret_val) in e1000_lv_phy_workarounds_ich8lan()
2815 return ret_val; in e1000_lv_phy_workarounds_ich8lan()
2817 ret_val = hw->phy.ops.acquire(hw); in e1000_lv_phy_workarounds_ich8lan()
2818 if (ret_val) in e1000_lv_phy_workarounds_ich8lan()
2819 return ret_val; in e1000_lv_phy_workarounds_ich8lan()
2821 ret_val = e1000_write_emi_reg_locked(hw, I82579_MSE_THRESHOLD, 0x0034); in e1000_lv_phy_workarounds_ich8lan()
2822 if (ret_val) in e1000_lv_phy_workarounds_ich8lan()
2825 ret_val = e1000_write_emi_reg_locked(hw, I82579_MSE_LINK_DOWN, 0x0005); in e1000_lv_phy_workarounds_ich8lan()
2829 return ret_val; in e1000_lv_phy_workarounds_ich8lan()
2841 s32 ret_val = 0; in e1000_k1_workaround_lv() local
2848 ret_val = e1e_rphy(hw, HV_M_STATUS, &status_reg); in e1000_k1_workaround_lv()
2849 if (ret_val) in e1000_k1_workaround_lv()
2850 return ret_val; in e1000_k1_workaround_lv()
2859 ret_val = e1e_rphy(hw, HV_PM_CTRL, &pm_phy_reg); in e1000_k1_workaround_lv()
2860 if (ret_val) in e1000_k1_workaround_lv()
2861 return ret_val; in e1000_k1_workaround_lv()
2863 ret_val = e1e_wphy(hw, HV_PM_CTRL, pm_phy_reg); in e1000_k1_workaround_lv()
2864 if (ret_val) in e1000_k1_workaround_lv()
2865 return ret_val; in e1000_k1_workaround_lv()
2876 return ret_val; in e1000_k1_workaround_lv()
2941 s32 ret_val = 0; in e1000_post_phy_reset_ich8lan() local
2953 ret_val = e1000_hv_phy_workarounds_ich8lan(hw); in e1000_post_phy_reset_ich8lan()
2954 if (ret_val) in e1000_post_phy_reset_ich8lan()
2955 return ret_val; in e1000_post_phy_reset_ich8lan()
2958 ret_val = e1000_lv_phy_workarounds_ich8lan(hw); in e1000_post_phy_reset_ich8lan()
2959 if (ret_val) in e1000_post_phy_reset_ich8lan()
2960 return ret_val; in e1000_post_phy_reset_ich8lan()
2974 ret_val = e1000_sw_lcd_config_ich8lan(hw); in e1000_post_phy_reset_ich8lan()
2975 if (ret_val) in e1000_post_phy_reset_ich8lan()
2976 return ret_val; in e1000_post_phy_reset_ich8lan()
2979 ret_val = e1000_oem_bits_config_ich8lan(hw, true); in e1000_post_phy_reset_ich8lan()
2989 ret_val = hw->phy.ops.acquire(hw); in e1000_post_phy_reset_ich8lan()
2990 if (ret_val) in e1000_post_phy_reset_ich8lan()
2991 return ret_val; in e1000_post_phy_reset_ich8lan()
2992 ret_val = e1000_write_emi_reg_locked(hw, in e1000_post_phy_reset_ich8lan()
2998 return ret_val; in e1000_post_phy_reset_ich8lan()
3011 s32 ret_val = 0; in e1000_phy_hw_reset_ich8lan() local
3018 ret_val = e1000e_phy_hw_reset_generic(hw); in e1000_phy_hw_reset_ich8lan()
3019 if (ret_val) in e1000_phy_hw_reset_ich8lan()
3020 return ret_val; in e1000_phy_hw_reset_ich8lan()
3038 s32 ret_val; in e1000_set_lplu_state_pchlan() local
3041 ret_val = e1e_rphy(hw, HV_OEM_BITS, &oem_reg); in e1000_set_lplu_state_pchlan()
3042 if (ret_val) in e1000_set_lplu_state_pchlan()
3043 return ret_val; in e1000_set_lplu_state_pchlan()
3073 s32 ret_val = 0; in e1000_set_d0_lplu_state_ich8lan() local
3095 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, &data); in e1000_set_d0_lplu_state_ich8lan()
3096 if (ret_val) in e1000_set_d0_lplu_state_ich8lan()
3097 return ret_val; in e1000_set_d0_lplu_state_ich8lan()
3099 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, data); in e1000_set_d0_lplu_state_ich8lan()
3100 if (ret_val) in e1000_set_d0_lplu_state_ich8lan()
3101 return ret_val; in e1000_set_d0_lplu_state_ich8lan()
3115 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d0_lplu_state_ich8lan()
3117 if (ret_val) in e1000_set_d0_lplu_state_ich8lan()
3118 return ret_val; in e1000_set_d0_lplu_state_ich8lan()
3121 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d0_lplu_state_ich8lan()
3123 if (ret_val) in e1000_set_d0_lplu_state_ich8lan()
3124 return ret_val; in e1000_set_d0_lplu_state_ich8lan()
3126 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d0_lplu_state_ich8lan()
3128 if (ret_val) in e1000_set_d0_lplu_state_ich8lan()
3129 return ret_val; in e1000_set_d0_lplu_state_ich8lan()
3132 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d0_lplu_state_ich8lan()
3134 if (ret_val) in e1000_set_d0_lplu_state_ich8lan()
3135 return ret_val; in e1000_set_d0_lplu_state_ich8lan()
3159 s32 ret_val = 0; in e1000_set_d3_lplu_state_ich8lan() local
3177 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d3_lplu_state_ich8lan()
3179 if (ret_val) in e1000_set_d3_lplu_state_ich8lan()
3180 return ret_val; in e1000_set_d3_lplu_state_ich8lan()
3183 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d3_lplu_state_ich8lan()
3185 if (ret_val) in e1000_set_d3_lplu_state_ich8lan()
3186 return ret_val; in e1000_set_d3_lplu_state_ich8lan()
3188 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d3_lplu_state_ich8lan()
3190 if (ret_val) in e1000_set_d3_lplu_state_ich8lan()
3191 return ret_val; in e1000_set_d3_lplu_state_ich8lan()
3194 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, in e1000_set_d3_lplu_state_ich8lan()
3196 if (ret_val) in e1000_set_d3_lplu_state_ich8lan()
3197 return ret_val; in e1000_set_d3_lplu_state_ich8lan()
3215 ret_val = e1e_rphy(hw, IGP01E1000_PHY_PORT_CONFIG, &data); in e1000_set_d3_lplu_state_ich8lan()
3216 if (ret_val) in e1000_set_d3_lplu_state_ich8lan()
3217 return ret_val; in e1000_set_d3_lplu_state_ich8lan()
3220 ret_val = e1e_wphy(hw, IGP01E1000_PHY_PORT_CONFIG, data); in e1000_set_d3_lplu_state_ich8lan()
3223 return ret_val; in e1000_set_d3_lplu_state_ich8lan()
3242 s32 ret_val; in e1000_valid_nvm_bank_detect_ich8lan() local
3260 ret_val = e1000_read_flash_dword_ich8lan(hw, act_offset, in e1000_valid_nvm_bank_detect_ich8lan()
3262 if (ret_val) in e1000_valid_nvm_bank_detect_ich8lan()
3263 return ret_val; in e1000_valid_nvm_bank_detect_ich8lan()
3272 ret_val = e1000_read_flash_dword_ich8lan(hw, act_offset + in e1000_valid_nvm_bank_detect_ich8lan()
3275 if (ret_val) in e1000_valid_nvm_bank_detect_ich8lan()
3276 return ret_val; in e1000_valid_nvm_bank_detect_ich8lan()
3305 ret_val = e1000_read_flash_byte_ich8lan(hw, act_offset, in e1000_valid_nvm_bank_detect_ich8lan()
3307 if (ret_val) in e1000_valid_nvm_bank_detect_ich8lan()
3308 return ret_val; in e1000_valid_nvm_bank_detect_ich8lan()
3316 ret_val = e1000_read_flash_byte_ich8lan(hw, act_offset + in e1000_valid_nvm_bank_detect_ich8lan()
3319 if (ret_val) in e1000_valid_nvm_bank_detect_ich8lan()
3320 return ret_val; in e1000_valid_nvm_bank_detect_ich8lan()
3347 s32 ret_val = 0; in e1000_read_nvm_spt() local
3356 ret_val = -E1000_ERR_NVM; in e1000_read_nvm_spt()
3362 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank); in e1000_read_nvm_spt()
3363 if (ret_val) { in e1000_read_nvm_spt()
3371 ret_val = 0; in e1000_read_nvm_spt()
3381 ret_val = in e1000_read_nvm_spt()
3385 if (ret_val) in e1000_read_nvm_spt()
3396 ret_val = in e1000_read_nvm_spt()
3400 if (ret_val) in e1000_read_nvm_spt()
3419 if (ret_val) in e1000_read_nvm_spt()
3420 e_dbg("NVM read error: %d\n", ret_val); in e1000_read_nvm_spt()
3422 return ret_val; in e1000_read_nvm_spt()
3440 s32 ret_val = 0; in e1000_read_nvm_ich8lan() local
3447 ret_val = -E1000_ERR_NVM; in e1000_read_nvm_ich8lan()
3453 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank); in e1000_read_nvm_ich8lan()
3454 if (ret_val) { in e1000_read_nvm_ich8lan()
3462 ret_val = 0; in e1000_read_nvm_ich8lan()
3467 ret_val = e1000_read_flash_word_ich8lan(hw, in e1000_read_nvm_ich8lan()
3470 if (ret_val) in e1000_read_nvm_ich8lan()
3479 if (ret_val) in e1000_read_nvm_ich8lan()
3480 e_dbg("NVM read error: %d\n", ret_val); in e1000_read_nvm_ich8lan()
3482 return ret_val; in e1000_read_nvm_ich8lan()
3495 s32 ret_val = -E1000_ERR_NVM; in e1000_flash_cycle_init_ich8lan() local
3531 ret_val = 0; in e1000_flash_cycle_init_ich8lan()
3541 ret_val = 0; in e1000_flash_cycle_init_ich8lan()
3546 if (!ret_val) { in e1000_flash_cycle_init_ich8lan()
3561 return ret_val; in e1000_flash_cycle_init_ich8lan()
3649 s32 ret_val; in e1000_read_flash_byte_ich8lan() local
3658 ret_val = e1000_read_flash_data_ich8lan(hw, offset, 1, &word); in e1000_read_flash_byte_ich8lan()
3660 if (ret_val) in e1000_read_flash_byte_ich8lan()
3661 return ret_val; in e1000_read_flash_byte_ich8lan()
3684 s32 ret_val = -E1000_ERR_NVM; in e1000_read_flash_data_ich8lan() local
3696 ret_val = e1000_flash_cycle_init_ich8lan(hw); in e1000_read_flash_data_ich8lan()
3697 if (ret_val) in e1000_read_flash_data_ich8lan()
3708 ret_val = in e1000_read_flash_data_ich8lan()
3717 if (!ret_val) { in e1000_read_flash_data_ich8lan()
3741 return ret_val; in e1000_read_flash_data_ich8lan()
3759 s32 ret_val = -E1000_ERR_NVM; in e1000_read_flash_data32_ich8lan() local
3770 ret_val = e1000_flash_cycle_init_ich8lan(hw); in e1000_read_flash_data32_ich8lan()
3771 if (ret_val) in e1000_read_flash_data32_ich8lan()
3787 ret_val = in e1000_read_flash_data32_ich8lan()
3796 if (!ret_val) { in e1000_read_flash_data32_ich8lan()
3816 return ret_val; in e1000_read_flash_data32_ich8lan()
3869 s32 ret_val; in e1000_update_nvm_checksum_spt() local
3872 ret_val = e1000e_update_nvm_checksum_generic(hw); in e1000_update_nvm_checksum_spt()
3873 if (ret_val) in e1000_update_nvm_checksum_spt()
3885 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank); in e1000_update_nvm_checksum_spt()
3886 if (ret_val) { in e1000_update_nvm_checksum_spt()
3894 ret_val = e1000_erase_flash_bank_ich8lan(hw, 1); in e1000_update_nvm_checksum_spt()
3895 if (ret_val) in e1000_update_nvm_checksum_spt()
3900 ret_val = e1000_erase_flash_bank_ich8lan(hw, 0); in e1000_update_nvm_checksum_spt()
3901 if (ret_val) in e1000_update_nvm_checksum_spt()
3909 ret_val = e1000_read_flash_dword_ich8lan(hw, in e1000_update_nvm_checksum_spt()
3922 if (ret_val) in e1000_update_nvm_checksum_spt()
3942 ret_val = e1000_retry_write_flash_dword_ich8lan(hw, act_offset, in e1000_update_nvm_checksum_spt()
3944 if (ret_val) in e1000_update_nvm_checksum_spt()
3951 if (ret_val) { in e1000_update_nvm_checksum_spt()
3966 ret_val = e1000_read_flash_dword_ich8lan(hw, act_offset, &dword); in e1000_update_nvm_checksum_spt()
3968 if (ret_val) in e1000_update_nvm_checksum_spt()
3972 ret_val = e1000_retry_write_flash_dword_ich8lan(hw, act_offset, dword); in e1000_update_nvm_checksum_spt()
3974 if (ret_val) in e1000_update_nvm_checksum_spt()
3979 ret_val = e1000_read_flash_dword_ich8lan(hw, act_offset, &dword); in e1000_update_nvm_checksum_spt()
3981 if (ret_val) in e1000_update_nvm_checksum_spt()
3985 ret_val = e1000_retry_write_flash_dword_ich8lan(hw, act_offset, dword); in e1000_update_nvm_checksum_spt()
3987 if (ret_val) in e1000_update_nvm_checksum_spt()
4002 if (!ret_val) { in e1000_update_nvm_checksum_spt()
4008 if (ret_val) in e1000_update_nvm_checksum_spt()
4009 e_dbg("NVM update error: %d\n", ret_val); in e1000_update_nvm_checksum_spt()
4011 return ret_val; in e1000_update_nvm_checksum_spt()
4030 s32 ret_val; in e1000_update_nvm_checksum_ich8lan() local
4033 ret_val = e1000e_update_nvm_checksum_generic(hw); in e1000_update_nvm_checksum_ich8lan()
4034 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4046 ret_val = e1000_valid_nvm_bank_detect_ich8lan(hw, &bank); in e1000_update_nvm_checksum_ich8lan()
4047 if (ret_val) { in e1000_update_nvm_checksum_ich8lan()
4055 ret_val = e1000_erase_flash_bank_ich8lan(hw, 1); in e1000_update_nvm_checksum_ich8lan()
4056 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4061 ret_val = e1000_erase_flash_bank_ich8lan(hw, 0); in e1000_update_nvm_checksum_ich8lan()
4062 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4069 ret_val = e1000_read_flash_word_ich8lan(hw, i + in e1000_update_nvm_checksum_ich8lan()
4072 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4091 ret_val = e1000_retry_write_flash_byte_ich8lan(hw, in e1000_update_nvm_checksum_ich8lan()
4094 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4098 ret_val = e1000_retry_write_flash_byte_ich8lan(hw, in e1000_update_nvm_checksum_ich8lan()
4101 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4108 if (ret_val) { in e1000_update_nvm_checksum_ich8lan()
4120 ret_val = e1000_read_flash_word_ich8lan(hw, act_offset, &data); in e1000_update_nvm_checksum_ich8lan()
4121 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4125 ret_val = e1000_retry_write_flash_byte_ich8lan(hw, in e1000_update_nvm_checksum_ich8lan()
4128 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4137 ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset, 0); in e1000_update_nvm_checksum_ich8lan()
4138 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4153 if (!ret_val) { in e1000_update_nvm_checksum_ich8lan()
4159 if (ret_val) in e1000_update_nvm_checksum_ich8lan()
4160 e_dbg("NVM update error: %d\n", ret_val); in e1000_update_nvm_checksum_ich8lan()
4162 return ret_val; in e1000_update_nvm_checksum_ich8lan()
4175 s32 ret_val; in e1000_validate_nvm_checksum_ich8lan() local
4204 ret_val = e1000_read_nvm(hw, word, 1, &data); in e1000_validate_nvm_checksum_ich8lan()
4205 if (ret_val) in e1000_validate_nvm_checksum_ich8lan()
4206 return ret_val; in e1000_validate_nvm_checksum_ich8lan()
4213 ret_val = e1000_write_nvm(hw, word, 1, &data); in e1000_validate_nvm_checksum_ich8lan()
4214 if (ret_val) in e1000_validate_nvm_checksum_ich8lan()
4215 return ret_val; in e1000_validate_nvm_checksum_ich8lan()
4216 ret_val = e1000e_update_nvm_checksum(hw); in e1000_validate_nvm_checksum_ich8lan()
4217 if (ret_val) in e1000_validate_nvm_checksum_ich8lan()
4218 return ret_val; in e1000_validate_nvm_checksum_ich8lan()
4281 s32 ret_val; in e1000_write_flash_data_ich8lan() local
4298 ret_val = e1000_flash_cycle_init_ich8lan(hw); in e1000_write_flash_data_ich8lan()
4299 if (ret_val) in e1000_write_flash_data_ich8lan()
4333 ret_val = in e1000_write_flash_data_ich8lan()
4336 if (!ret_val) in e1000_write_flash_data_ich8lan()
4354 return ret_val; in e1000_write_flash_data_ich8lan()
4371 s32 ret_val; in e1000_write_flash_data32_ich8lan() local
4383 ret_val = e1000_flash_cycle_init_ich8lan(hw); in e1000_write_flash_data32_ich8lan()
4384 if (ret_val) in e1000_write_flash_data32_ich8lan()
4415 ret_val = in e1000_write_flash_data32_ich8lan()
4419 if (!ret_val) in e1000_write_flash_data32_ich8lan()
4438 return ret_val; in e1000_write_flash_data32_ich8lan()
4469 s32 ret_val; in e1000_retry_write_flash_dword_ich8lan() local
4474 ret_val = e1000_write_flash_data32_ich8lan(hw, offset, dword); in e1000_retry_write_flash_dword_ich8lan()
4476 if (!ret_val) in e1000_retry_write_flash_dword_ich8lan()
4477 return ret_val; in e1000_retry_write_flash_dword_ich8lan()
4481 ret_val = e1000_write_flash_data32_ich8lan(hw, offset, dword); in e1000_retry_write_flash_dword_ich8lan()
4482 if (!ret_val) in e1000_retry_write_flash_dword_ich8lan()
4503 s32 ret_val; in e1000_retry_write_flash_byte_ich8lan() local
4506 ret_val = e1000_write_flash_byte_ich8lan(hw, offset, byte); in e1000_retry_write_flash_byte_ich8lan()
4507 if (!ret_val) in e1000_retry_write_flash_byte_ich8lan()
4508 return ret_val; in e1000_retry_write_flash_byte_ich8lan()
4513 ret_val = e1000_write_flash_byte_ich8lan(hw, offset, byte); in e1000_retry_write_flash_byte_ich8lan()
4514 if (!ret_val) in e1000_retry_write_flash_byte_ich8lan()
4539 s32 ret_val; in e1000_erase_flash_bank_ich8lan() local
4588 ret_val = e1000_flash_cycle_init_ich8lan(hw); in e1000_erase_flash_bank_ich8lan()
4589 if (ret_val) in e1000_erase_flash_bank_ich8lan()
4590 return ret_val; in e1000_erase_flash_bank_ich8lan()
4615 ret_val = e1000_flash_cycle_ich8lan(hw, timeout); in e1000_erase_flash_bank_ich8lan()
4616 if (!ret_val) in e1000_erase_flash_bank_ich8lan()
4628 return ret_val; in e1000_erase_flash_bank_ich8lan()
4646 s32 ret_val; in e1000_valid_led_default_ich8lan() local
4648 ret_val = e1000_read_nvm(hw, NVM_ID_LED_SETTINGS, 1, data); in e1000_valid_led_default_ich8lan()
4649 if (ret_val) { in e1000_valid_led_default_ich8lan()
4651 return ret_val; in e1000_valid_led_default_ich8lan()
4676 s32 ret_val; in e1000_id_led_init_pchlan() local
4682 ret_val = hw->nvm.ops.valid_led_default(hw, &data); in e1000_id_led_init_pchlan()
4683 if (ret_val) in e1000_id_led_init_pchlan()
4684 return ret_val; in e1000_id_led_init_pchlan()
4742 s32 ret_val; in e1000_get_bus_info_ich8lan() local
4744 ret_val = e1000e_get_bus_info_pcie(hw); in e1000_get_bus_info_ich8lan()
4754 return ret_val; in e1000_get_bus_info_ich8lan()
4769 s32 ret_val; in e1000_reset_hw_ich8lan() local
4774 ret_val = e1000e_disable_pcie_master(hw); in e1000_reset_hw_ich8lan()
4775 if (ret_val) in e1000_reset_hw_ich8lan()
4801 ret_val = e1000_read_nvm(hw, E1000_NVM_K1_CONFIG, 1, &kum_cfg); in e1000_reset_hw_ich8lan()
4802 if (ret_val) in e1000_reset_hw_ich8lan()
4803 return ret_val; in e1000_reset_hw_ich8lan()
4827 ret_val = e1000_acquire_swflag_ich8lan(hw); in e1000_reset_hw_ich8lan()
4841 if (!ret_val) in e1000_reset_hw_ich8lan()
4845 ret_val = hw->phy.ops.get_cfg_done(hw); in e1000_reset_hw_ich8lan()
4846 if (ret_val) in e1000_reset_hw_ich8lan()
4847 return ret_val; in e1000_reset_hw_ich8lan()
4849 ret_val = e1000_post_phy_reset_ich8lan(hw); in e1000_reset_hw_ich8lan()
4850 if (ret_val) in e1000_reset_hw_ich8lan()
4851 return ret_val; in e1000_reset_hw_ich8lan()
4887 s32 ret_val; in e1000_init_hw_ich8lan() local
4893 ret_val = mac->ops.id_led_init(hw); in e1000_init_hw_ich8lan()
4895 if (ret_val) in e1000_init_hw_ich8lan()
4914 ret_val = e1000_phy_hw_reset_ich8lan(hw); in e1000_init_hw_ich8lan()
4915 if (ret_val) in e1000_init_hw_ich8lan()
4916 return ret_val; in e1000_init_hw_ich8lan()
4920 ret_val = mac->ops.setup_link(hw); in e1000_init_hw_ich8lan()
4965 return ret_val; in e1000_init_hw_ich8lan()
5057 s32 ret_val; in e1000_setup_link_ich8lan() local
5082 ret_val = hw->mac.ops.setup_physical_interface(hw); in e1000_setup_link_ich8lan()
5083 if (ret_val) in e1000_setup_link_ich8lan()
5084 return ret_val; in e1000_setup_link_ich8lan()
5093 ret_val = e1e_wphy(hw, PHY_REG(BM_PORT_CTRL_PAGE, 27), in e1000_setup_link_ich8lan()
5095 if (ret_val) in e1000_setup_link_ich8lan()
5096 return ret_val; in e1000_setup_link_ich8lan()
5113 s32 ret_val; in e1000_setup_copper_link_ich8lan() local
5125 ret_val = e1000e_write_kmrn_reg(hw, E1000_KMRNCTRLSTA_TIMEOUTS, 0xFFFF); in e1000_setup_copper_link_ich8lan()
5126 if (ret_val) in e1000_setup_copper_link_ich8lan()
5127 return ret_val; in e1000_setup_copper_link_ich8lan()
5128 ret_val = e1000e_read_kmrn_reg(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, in e1000_setup_copper_link_ich8lan()
5130 if (ret_val) in e1000_setup_copper_link_ich8lan()
5131 return ret_val; in e1000_setup_copper_link_ich8lan()
5133 ret_val = e1000e_write_kmrn_reg(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, in e1000_setup_copper_link_ich8lan()
5135 if (ret_val) in e1000_setup_copper_link_ich8lan()
5136 return ret_val; in e1000_setup_copper_link_ich8lan()
5140 ret_val = e1000e_copper_link_setup_igp(hw); in e1000_setup_copper_link_ich8lan()
5141 if (ret_val) in e1000_setup_copper_link_ich8lan()
5142 return ret_val; in e1000_setup_copper_link_ich8lan()
5146 ret_val = e1000e_copper_link_setup_m88(hw); in e1000_setup_copper_link_ich8lan()
5147 if (ret_val) in e1000_setup_copper_link_ich8lan()
5148 return ret_val; in e1000_setup_copper_link_ich8lan()
5152 ret_val = e1000_copper_link_setup_82577(hw); in e1000_setup_copper_link_ich8lan()
5153 if (ret_val) in e1000_setup_copper_link_ich8lan()
5154 return ret_val; in e1000_setup_copper_link_ich8lan()
5157 ret_val = e1e_rphy(hw, IFE_PHY_MDIX_CONTROL, &reg_data); in e1000_setup_copper_link_ich8lan()
5158 if (ret_val) in e1000_setup_copper_link_ich8lan()
5159 return ret_val; in e1000_setup_copper_link_ich8lan()
5175 ret_val = e1e_wphy(hw, IFE_PHY_MDIX_CONTROL, reg_data); in e1000_setup_copper_link_ich8lan()
5176 if (ret_val) in e1000_setup_copper_link_ich8lan()
5177 return ret_val; in e1000_setup_copper_link_ich8lan()
5197 s32 ret_val; in e1000_setup_copper_link_pch_lpt() local
5204 ret_val = e1000_copper_link_setup_82577(hw); in e1000_setup_copper_link_pch_lpt()
5205 if (ret_val) in e1000_setup_copper_link_pch_lpt()
5206 return ret_val; in e1000_setup_copper_link_pch_lpt()
5224 s32 ret_val; in e1000_get_link_up_info_ich8lan() local
5226 ret_val = e1000e_get_speed_and_duplex_copper(hw, speed, duplex); in e1000_get_link_up_info_ich8lan()
5227 if (ret_val) in e1000_get_link_up_info_ich8lan()
5228 return ret_val; in e1000_get_link_up_info_ich8lan()
5232 ret_val = e1000_kmrn_lock_loss_workaround_ich8lan(hw); in e1000_get_link_up_info_ich8lan()
5235 return ret_val; in e1000_get_link_up_info_ich8lan()
5257 s32 ret_val; in e1000_kmrn_lock_loss_workaround_ich8lan() local
5268 ret_val = e1000e_phy_has_link_generic(hw, 1, 0, &link); in e1000_kmrn_lock_loss_workaround_ich8lan()
5274 ret_val = e1e_rphy(hw, IGP3_KMRN_DIAG, &data); in e1000_kmrn_lock_loss_workaround_ich8lan()
5275 if (ret_val) in e1000_kmrn_lock_loss_workaround_ich8lan()
5276 return ret_val; in e1000_kmrn_lock_loss_workaround_ich8lan()
5278 ret_val = e1e_rphy(hw, IGP3_KMRN_DIAG, &data); in e1000_kmrn_lock_loss_workaround_ich8lan()
5279 if (ret_val) in e1000_kmrn_lock_loss_workaround_ich8lan()
5280 return ret_val; in e1000_kmrn_lock_loss_workaround_ich8lan()
5389 s32 ret_val; in e1000e_gig_downshift_workaround_ich8lan() local
5395 ret_val = e1000e_read_kmrn_reg(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET, in e1000e_gig_downshift_workaround_ich8lan()
5397 if (ret_val) in e1000e_gig_downshift_workaround_ich8lan()
5400 ret_val = e1000e_write_kmrn_reg(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET, in e1000e_gig_downshift_workaround_ich8lan()
5402 if (ret_val) in e1000e_gig_downshift_workaround_ich8lan()
5426 s32 ret_val; in e1000_suspend_workarounds_ich8lan() local
5444 ret_val = hw->phy.ops.acquire(hw); in e1000_suspend_workarounds_ich8lan()
5445 if (ret_val) in e1000_suspend_workarounds_ich8lan()
5451 ret_val = in e1000_suspend_workarounds_ich8lan()
5455 if (ret_val) in e1000_suspend_workarounds_ich8lan()
5528 ret_val = hw->phy.ops.acquire(hw); in e1000_suspend_workarounds_ich8lan()
5529 if (ret_val) in e1000_suspend_workarounds_ich8lan()
5548 s32 ret_val; in e1000_resume_workarounds_pchlan() local
5553 ret_val = e1000_init_phy_workarounds_pchlan(hw); in e1000_resume_workarounds_pchlan()
5554 if (ret_val) { in e1000_resume_workarounds_pchlan()
5555 e_dbg("Failed to init PHY flow ret_val=%d\n", ret_val); in e1000_resume_workarounds_pchlan()
5567 ret_val = hw->phy.ops.acquire(hw); in e1000_resume_workarounds_pchlan()
5568 if (ret_val) { in e1000_resume_workarounds_pchlan()
5582 ret_val = e1e_rphy_locked(hw, I217_MEMPWR, &phy_reg); in e1000_resume_workarounds_pchlan()
5583 if (ret_val) in e1000_resume_workarounds_pchlan()
5592 ret_val = e1e_rphy_locked(hw, I217_CGFREG, &phy_reg); in e1000_resume_workarounds_pchlan()
5593 if (ret_val) in e1000_resume_workarounds_pchlan()
5598 if (ret_val) in e1000_resume_workarounds_pchlan()
5599 e_dbg("Error %d in resume workarounds\n", ret_val); in e1000_resume_workarounds_pchlan()
5748 s32 ret_val = 0; in e1000_get_cfg_done_ich8lan() local
5758 ret_val = e1000e_get_auto_rd_done(hw); in e1000_get_cfg_done_ich8lan()
5759 if (ret_val) { in e1000_get_cfg_done_ich8lan()
5765 ret_val = 0; in e1000_get_cfg_done_ich8lan()
5786 ret_val = -E1000_ERR_CONFIG; in e1000_get_cfg_done_ich8lan()
5790 return ret_val; in e1000_get_cfg_done_ich8lan()
5818 s32 ret_val; in e1000_clear_hw_cntrs_ich8lan() local
5841 ret_val = hw->phy.ops.acquire(hw); in e1000_clear_hw_cntrs_ich8lan()
5842 if (ret_val) in e1000_clear_hw_cntrs_ich8lan()
5844 ret_val = hw->phy.ops.set_page(hw, in e1000_clear_hw_cntrs_ich8lan()
5846 if (ret_val) in e1000_clear_hw_cntrs_ich8lan()