aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2012-12-11 23:45:51 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-27 04:07:35 -0500
commit6e928b721c73817cd20f7dc7a303b3b7e57bff1d (patch)
tree916892b28d2cb8b1ec655fb8f303dd64fdb53849
parent94fb848bf43fae3410639fb2110a783200e9e1da (diff)
e1000e: prevent hardware from automatically configuring PHY on I217/I218
As done with the previous generation managed 82579, prevent the PHY from being put into an unknown state by blocking the hardware from automatically configuring the PHY as done with the previous generation managed 82579. Instead, the driver should configure the PHY with contents of the EEPROM image. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/e1000e/ich8lan.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 56cbfa7981eb..9a93223bd09a 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -363,10 +363,15 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
363 s32 ret_val; 363 s32 ret_val;
364 u16 phy_reg; 364 u16 phy_reg;
365 365
366 /* Gate automatic PHY configuration by hardware on managed and
367 * non-managed 82579 and newer adapters.
368 */
369 e1000_gate_hw_phy_config_ich8lan(hw, true);
370
366 ret_val = hw->phy.ops.acquire(hw); 371 ret_val = hw->phy.ops.acquire(hw);
367 if (ret_val) { 372 if (ret_val) {
368 e_dbg("Failed to initialize PHY flow\n"); 373 e_dbg("Failed to initialize PHY flow\n");
369 return ret_val; 374 goto out;
370 } 375 }
371 376
372 /* The MAC-PHY interconnect may be in SMBus mode. If the PHY is 377 /* The MAC-PHY interconnect may be in SMBus mode. If the PHY is
@@ -387,13 +392,6 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
387 392
388 /* fall-through */ 393 /* fall-through */
389 case e1000_pch2lan: 394 case e1000_pch2lan:
390 /* Gate automatic PHY configuration by hardware on
391 * non-managed 82579
392 */
393 if ((hw->mac.type == e1000_pch2lan) &&
394 !(fwsm & E1000_ICH_FWSM_FW_VALID))
395 e1000_gate_hw_phy_config_ich8lan(hw, true);
396
397 if (e1000_phy_is_accessible_pchlan(hw)) { 395 if (e1000_phy_is_accessible_pchlan(hw)) {
398 if (hw->mac.type == e1000_pch_lpt) { 396 if (hw->mac.type == e1000_pch_lpt) {
399 /* Unforce SMBus mode in PHY */ 397 /* Unforce SMBus mode in PHY */
@@ -461,6 +459,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
461 */ 459 */
462 ret_val = e1000e_phy_hw_reset_generic(hw); 460 ret_val = e1000e_phy_hw_reset_generic(hw);
463 461
462out:
464 /* Ungate automatic PHY configuration on non-managed 82579 */ 463 /* Ungate automatic PHY configuration on non-managed 82579 */
465 if ((hw->mac.type == e1000_pch2lan) && 464 if ((hw->mac.type == e1000_pch2lan) &&
466 !(fwsm & E1000_ICH_FWSM_FW_VALID)) { 465 !(fwsm & E1000_ICH_FWSM_FW_VALID)) {
@@ -763,13 +762,6 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
763 if (mac->type == e1000_ich8lan) 762 if (mac->type == e1000_ich8lan)
764 e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, true); 763 e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw, true);
765 764
766 /* Gate automatic PHY configuration by hardware on managed
767 * 82579 and i217
768 */
769 if ((mac->type == e1000_pch2lan || mac->type == e1000_pch_lpt) &&
770 (er32(FWSM) & E1000_ICH_FWSM_FW_VALID))
771 e1000_gate_hw_phy_config_ich8lan(hw, true);
772
773 return 0; 765 return 0;
774} 766}
775 767