e1000/base: return error in resume workaround
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Fri, 16 Oct 2015 02:51:05 +0000 (10:51 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 27 Oct 2015 13:20:24 +0000 (14:20 +0100)
Add u32 return value to function e1000_resume_workarounds_pchlan,
so that calling function can detect PHY access failure during resuming
flow.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
drivers/net/e1000/base/e1000_ich8lan.c
drivers/net/e1000/base/e1000_ich8lan.h

index 9595ca3..270e906 100644 (file)
@@ -4923,19 +4923,18 @@ out:
  *  the PHY.
  *  On i217, setup Intel Rapid Start Technology.
  **/
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
 {
        s32 ret_val;
 
        DEBUGFUNC("e1000_resume_workarounds_pchlan");
-
        if (hw->mac.type < e1000_pch2lan)
-               return;
+               return E1000_SUCCESS;
 
        ret_val = e1000_init_phy_workarounds_pchlan(hw);
        if (ret_val) {
                DEBUGOUT1("Failed to init PHY flow ret_val=%d\n", ret_val);
-               return;
+               return ret_val;
        }
 
        /* For i217 Intel Rapid Start Technology support when the system
@@ -4949,7 +4948,7 @@ void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
                ret_val = hw->phy.ops.acquire(hw);
                if (ret_val) {
                        DEBUGOUT("Failed to setup iRST\n");
-                       return;
+                       return ret_val;
                }
 
                /* Clear Auto Enable LPI after link up */
@@ -4983,7 +4982,9 @@ release:
                if (ret_val)
                        DEBUGOUT1("Error %d in resume workarounds\n", ret_val);
                hw->phy.ops.release(hw);
+               return ret_val;
        }
+       return E1000_SUCCESS;
 }
 
 /**
index 149862e..97da6bf 100644 (file)
@@ -297,7 +297,7 @@ void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
 void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
 void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
 void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
 s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
 void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
 s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);