Commit 3aeab7c1 authored by Bruce Allan's avatar Bruce Allan Committed by Greg Kroah-Hartman

e1000e: Reset 82577/82578 PHY before first PHY register read

commit 627c8a04 upstream.

Reset the PHY before first accessing it.  Doing so, ensure that the PHY is
in a known good state before we read/write PHY registers. This fixes a
driver probe failure.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
[Backported to 2.6.32 by dann frazier <dannf@debian.org>]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 88949121
...@@ -274,6 +274,16 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) ...@@ -274,6 +274,16 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
phy->ops.write_phy_reg_locked = e1000_write_phy_reg_hv_locked; phy->ops.write_phy_reg_locked = e1000_write_phy_reg_hv_locked;
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
/*
* Reset the PHY before any acccess to it. Doing so, ensures that
* the PHY is in a known good state before we read/write PHY registers.
* The generic reset is sufficient here, because we haven't determined
* the PHY type yet.
*/
ret_val = e1000e_phy_hw_reset_generic(hw);
if (ret_val)
goto out;
phy->id = e1000_phy_unknown; phy->id = e1000_phy_unknown;
e1000e_get_phy_id(hw); e1000e_get_phy_id(hw);
phy->type = e1000e_get_phy_type_from_id(phy->id); phy->type = e1000e_get_phy_type_from_id(phy->id);
...@@ -287,6 +297,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw) ...@@ -287,6 +297,7 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
phy->ops.commit_phy = e1000e_phy_sw_reset; phy->ops.commit_phy = e1000e_phy_sw_reset;
} }
out:
return ret_val; return ret_val;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment