Commit 53c992fa authored by Nick Nunley's avatar Nick Nunley Committed by David S. Miller

igb: ignore EEPROM APME check when shutting down serdes link

Checking the EEPROM APME state unnecessarily prevents the link from
shutting down. The standard power down routines should be
sufficient to determine whether the serdes link can power down
when going into D3.
Signed-off-by: default avatarNicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3145535a
...@@ -791,27 +791,12 @@ static s32 igb_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw, u16 *speed, ...@@ -791,27 +791,12 @@ static s32 igb_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw, u16 *speed,
void igb_shutdown_serdes_link_82575(struct e1000_hw *hw) void igb_shutdown_serdes_link_82575(struct e1000_hw *hw)
{ {
u32 reg; u32 reg;
u16 eeprom_data = 0;
if (hw->phy.media_type != e1000_media_type_internal_serdes || if (hw->phy.media_type != e1000_media_type_internal_serdes &&
igb_sgmii_active_82575(hw)) igb_sgmii_active_82575(hw))
return; return;
if (hw->bus.func == E1000_FUNC_0) if (!igb_enable_mng_pass_thru(hw)) {
hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
else if (hw->mac.type == e1000_82580)
hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A +
NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
&eeprom_data);
else if (hw->bus.func == E1000_FUNC_1)
hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_B, 1, &eeprom_data);
/*
* If APM is not enabled in the EEPROM and management interface is
* not enabled, then power down.
*/
if (!(eeprom_data & E1000_NVM_APME_82575) &&
!igb_enable_mng_pass_thru(hw)) {
/* Disable PCS to turn off link */ /* Disable PCS to turn off link */
reg = rd32(E1000_PCS_CFG0); reg = rd32(E1000_PCS_CFG0);
reg &= ~E1000_PCS_CFG_PCS_EN; reg &= ~E1000_PCS_CFG_PCS_EN;
...@@ -826,8 +811,6 @@ void igb_shutdown_serdes_link_82575(struct e1000_hw *hw) ...@@ -826,8 +811,6 @@ void igb_shutdown_serdes_link_82575(struct e1000_hw *hw)
wrfl(); wrfl();
msleep(1); msleep(1);
} }
return;
} }
/** /**
......
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