From 4dbd389269168d99445450eb5a423b85acc2b0e4 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 25 Feb 2024 14:35:00 +0300 Subject: ich8lan: reset the hardware if PHY init workarounds failed for 1st time Hardware reset and re-initialization CAN fix the issue with failed initialization. Signed-off-by: Denis Turischev Signed-off-by: Joursoir --- src/ich8lan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ich8lan.c b/src/ich8lan.c index 4a2342a..8586b67 100644 --- a/src/ich8lan.c +++ b/src/ich8lan.c @@ -89,6 +89,7 @@ static s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active); static s32 e1000_id_led_init_pchlan(struct e1000_hw *hw); static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force); static s32 e1000_setup_copper_link_pch_lpt(struct e1000_hw *hw); +static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw); static s32 e1000_cleanup_led_ich8lan(struct e1000_hw *hw); static s32 e1000_led_on_ich8lan(struct e1000_hw *hw); static s32 e1000_led_off_ich8lan(struct e1000_hw *hw); @@ -429,8 +430,12 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) phy->id = e1000_phy_unknown; ret_val = e1000_init_phy_workarounds_pchlan(hw); - if (ret_val) - return ret_val; + if (ret_val) { + e1000_reset_hw_ich8lan(hw); + ret_val = e1000_init_phy_workarounds_pchlan(hw); + if (ret_val) + return ret_val; + } if (phy->id == e1000_phy_unknown) switch (hw->mac.type) { -- cgit v1.2.3-18-g5258