PHYs supported by e100 re-starts auto-negotiation after writing to
BMCR_RESET bit. This patch powers down PHY when the interface is down
and reset is issued.

Signed-off-by: Jiang Wang <[email protected]>
---
 drivers/net/ethernet/intel/e100.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/intel/e100.c 
b/drivers/net/ethernet/intel/e100.c
index 9824e0a..b8e4910 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -2386,6 +2386,13 @@ static int e100_set_settings(struct net_device *netdev, 
struct ethtool_cmd *cmd)
        err = mii_ethtool_sset(&nic->mii, cmd);
        e100_exec_cb(nic, NULL, e100_configure);
 
+       if (!netif_running(netdev) && !(nic->flags & wol_magic)) {
+               uint16_t phy_data;
+               phy_data = mdio_read(nic->netdev, nic->mii.phy_id, MII_BMCR);
+               phy_data |= BMCR_PDOWN;
+               mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, phy_data);
+       }
+
        return err;
 }
 
-- 
1.7.1


------------------------------------------------------------------------------
Cloud Computing - Latest Buzzword or a Glimpse of the Future?
This paper surveys cloud computing today: What are the benefits? 
Why are businesses embracing it? What are its payoffs and pitfalls?
http://www.accelacomm.com/jaw/sdnl/114/51425149/
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to