aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/e1000_82575.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/e1000_82575.c')
-rw-r--r--drivers/net/igb/e1000_82575.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index c505b50d1fa3..59817bcc7169 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -791,27 +791,12 @@ static s32 igb_get_pcs_speed_and_duplex_82575(struct e1000_hw *hw, u16 *speed,
791void igb_shutdown_serdes_link_82575(struct e1000_hw *hw) 791void igb_shutdown_serdes_link_82575(struct e1000_hw *hw)
792{ 792{
793 u32 reg; 793 u32 reg;
794 u16 eeprom_data = 0;
795 794
796 if (hw->phy.media_type != e1000_media_type_internal_serdes || 795 if (hw->phy.media_type != e1000_media_type_internal_serdes &&
797 igb_sgmii_active_82575(hw)) 796 igb_sgmii_active_82575(hw))
798 return; 797 return;
799 798
800 if (hw->bus.func == E1000_FUNC_0) 799 if (!igb_enable_mng_pass_thru(hw)) {
801 hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
802 else if (hw->mac.type == e1000_82580)
803 hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A +
804 NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
805 &eeprom_data);
806 else if (hw->bus.func == E1000_FUNC_1)
807 hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_B, 1, &eeprom_data);
808
809 /*
810 * If APM is not enabled in the EEPROM and management interface is
811 * not enabled, then power down.
812 */
813 if (!(eeprom_data & E1000_NVM_APME_82575) &&
814 !igb_enable_mng_pass_thru(hw)) {
815 /* Disable PCS to turn off link */ 800 /* Disable PCS to turn off link */
816 reg = rd32(E1000_PCS_CFG0); 801 reg = rd32(E1000_PCS_CFG0);
817 reg &= ~E1000_PCS_CFG_PCS_EN; 802 reg &= ~E1000_PCS_CFG_PCS_EN;
@@ -826,8 +811,6 @@ void igb_shutdown_serdes_link_82575(struct e1000_hw *hw)
826 wrfl(); 811 wrfl();
827 msleep(1); 812 msleep(1);
828 } 813 }
829
830 return;
831} 814}
832 815
833/** 816/**