Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37956
b: refs/heads/master
c: 61c2505
h: refs/heads/master
v: v3
  • Loading branch information
Bruce Allan authored and Auke Kok committed Sep 27, 2006
1 parent 20392ed commit 27e7acf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09ae3e88662478c014617291e5a2115e6b2f65eb
refs/heads/master: 61c2505fd5044d9e108acc6b469d3caa02522043
41 changes: 32 additions & 9 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,25 +512,48 @@ void e1000_power_up_phy(struct e1000_adapter *adapter)

static void e1000_power_down_phy(struct e1000_adapter *adapter)
{
boolean_t mng_mode_enabled = (adapter->hw.mac_type >= e1000_82571) &&
e1000_check_mng_mode(&adapter->hw);
/* Power down the PHY so no link is implied when interface is down
* The PHY cannot be powered down if any of the following is TRUE
/* Power down the PHY so no link is implied when interface is down *
* The PHY cannot be powered down if any of the following is TRUE *
* (a) WoL is enabled
* (b) AMT is active
* (c) SoL/IDER session is active */
if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 &&
adapter->hw.mac_type != e1000_ich8lan &&
adapter->hw.media_type == e1000_media_type_copper &&
!(E1000_READ_REG(&adapter->hw, MANC) & E1000_MANC_SMBUS_EN) &&
!mng_mode_enabled &&
!e1000_check_phy_reset_block(&adapter->hw)) {
adapter->hw.media_type == e1000_media_type_copper) {
uint16_t mii_reg = 0;

switch (adapter->hw.mac_type) {
case e1000_82540:
case e1000_82545:
case e1000_82545_rev_3:
case e1000_82546:
case e1000_82546_rev_3:
case e1000_82541:
case e1000_82541_rev_2:
case e1000_82547:
case e1000_82547_rev_2:
if (E1000_READ_REG(&adapter->hw, MANC) &
E1000_MANC_SMBUS_EN)
goto out;
break;
case e1000_82571:
case e1000_82572:
case e1000_82573:
case e1000_80003es2lan:
case e1000_ich8lan:
if (e1000_check_mng_mode(&adapter->hw) ||
e1000_check_phy_reset_block(&adapter->hw))
goto out;
break;
default:
goto out;
}
e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg);
mdelay(1);
}
out:
return;
}

void
Expand Down

0 comments on commit 27e7acf

Please sign in to comment.