Skip to content

Commit 559a208

Browse files
Aaron Sierragregkh
authored andcommitted
igb: reset the PHY before reading the PHY ID
[ Upstream commit 182785335447957409282ca745aa5bc3968facee ] Several people have reported firmware leaving the I210/I211 PHY's page select register set to something other than the default of zero. This causes the first accesses, PHY_IDx register reads, to access something else, resulting in device probe failure: igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k igb: Copyright (c) 2007-2014 Intel Corporation. igb: probe of 0000:01:00.0 failed with error -2 This problem began for them after a previous patch I submitted was applied: commit 2a3cdead8b408351fa1e3079b220fa331480ffbc Author: Aaron Sierra <asierra@xes-inc.com> Date: Tue Nov 3 12:37:09 2015 -0600 igb: Remove GS40G specific defines/functions I personally experienced this problem after attempting to PXE boot from I210 devices using this firmware: Intel(R) Boot Agent GE v1.5.78 Copyright (C) 1997-2014, Intel Corporation Resetting the PHY before reading from it, ensures the page select register is in its default state and doesn't make assumptions about the PHY's register set before the PHY has been probed. Cc: Matwey V. Kornilov <matwey@sai.msu.ru> Cc: Chris Arges <carges@vectranetworks.com> Cc: Jochen Henneberg <jh@henneberg-systemdesign.com> Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Tested-by: Matwey V. Kornilov <matwey@sai.msu.ru> Tested-by: Chris J Arges <christopherarges@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7878dca commit 559a208

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/net/ethernet/intel/igb/e1000_82575.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,17 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
223223
hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
224224
E1000_STATUS_FUNC_SHIFT;
225225

226+
/* Make sure the PHY is in a good state. Several people have reported
227+
* firmware leaving the PHY's page select register set to something
228+
* other than the default of zero, which causes the PHY ID read to
229+
* access something other than the intended register.
230+
*/
231+
ret_val = hw->phy.ops.reset(hw);
232+
if (ret_val) {
233+
hw_dbg("Error resetting the PHY.\n");
234+
goto out;
235+
}
236+
226237
/* Set phy->phy_addr and phy->id. */
227238
ret_val = igb_get_phy_id_82575(hw);
228239
if (ret_val)

0 commit comments

Comments
 (0)