diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2006-09-27 15:53:54 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-09-27 15:53:54 -0400 |
commit | 61c2505fd5044d9e108acc6b469d3caa02522043 (patch) | |
tree | d9dda9a38eb72df8c55f02dfccfbd120a3d05a75 /drivers/net/e1000 | |
parent | 09ae3e88662478c014617291e5a2115e6b2f65eb (diff) |
e1000: handle manageability for pci-e adapters at PHY powerdown
When powering down the PHY (if WoL is disabled) we should only check
copper PHY's and handle PCI-E adapters differently.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index aaadb2bb0763..fd30161d2f12 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -512,25 +512,48 @@ void e1000_power_up_phy(struct e1000_adapter *adapter) | |||
512 | 512 | ||
513 | static void e1000_power_down_phy(struct e1000_adapter *adapter) | 513 | static void e1000_power_down_phy(struct e1000_adapter *adapter) |
514 | { | 514 | { |
515 | boolean_t mng_mode_enabled = (adapter->hw.mac_type >= e1000_82571) && | 515 | /* Power down the PHY so no link is implied when interface is down * |
516 | e1000_check_mng_mode(&adapter->hw); | 516 | * The PHY cannot be powered down if any of the following is TRUE * |
517 | /* Power down the PHY so no link is implied when interface is down | ||
518 | * The PHY cannot be powered down if any of the following is TRUE | ||
519 | * (a) WoL is enabled | 517 | * (a) WoL is enabled |
520 | * (b) AMT is active | 518 | * (b) AMT is active |
521 | * (c) SoL/IDER session is active */ | 519 | * (c) SoL/IDER session is active */ |
522 | if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 && | 520 | if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 && |
523 | adapter->hw.mac_type != e1000_ich8lan && | 521 | adapter->hw.media_type == e1000_media_type_copper) { |
524 | adapter->hw.media_type == e1000_media_type_copper && | ||
525 | !(E1000_READ_REG(&adapter->hw, MANC) & E1000_MANC_SMBUS_EN) && | ||
526 | !mng_mode_enabled && | ||
527 | !e1000_check_phy_reset_block(&adapter->hw)) { | ||
528 | uint16_t mii_reg = 0; | 522 | uint16_t mii_reg = 0; |
523 | |||
524 | switch (adapter->hw.mac_type) { | ||
525 | case e1000_82540: | ||
526 | case e1000_82545: | ||
527 | case e1000_82545_rev_3: | ||
528 | case e1000_82546: | ||
529 | case e1000_82546_rev_3: | ||
530 | case e1000_82541: | ||
531 | case e1000_82541_rev_2: | ||
532 | case e1000_82547: | ||
533 | case e1000_82547_rev_2: | ||
534 | if (E1000_READ_REG(&adapter->hw, MANC) & | ||
535 | E1000_MANC_SMBUS_EN) | ||
536 | goto out; | ||
537 | break; | ||
538 | case e1000_82571: | ||
539 | case e1000_82572: | ||
540 | case e1000_82573: | ||
541 | case e1000_80003es2lan: | ||
542 | case e1000_ich8lan: | ||
543 | if (e1000_check_mng_mode(&adapter->hw) || | ||
544 | e1000_check_phy_reset_block(&adapter->hw)) | ||
545 | goto out; | ||
546 | break; | ||
547 | default: | ||
548 | goto out; | ||
549 | } | ||
529 | e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg); | 550 | e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg); |
530 | mii_reg |= MII_CR_POWER_DOWN; | 551 | mii_reg |= MII_CR_POWER_DOWN; |
531 | e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg); | 552 | e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg); |
532 | mdelay(1); | 553 | mdelay(1); |
533 | } | 554 | } |
555 | out: | ||
556 | return; | ||
534 | } | 557 | } |
535 | 558 | ||
536 | void | 559 | void |