[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1323830996-16388-2-git-send-email-Jiang.Wang@riverbed.com>
Date: Tue, 13 Dec 2011 18:49:56 -0800
From: Jiang Wang <Jiang.Wang@...erbed.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Bruce Allan <bruce.w.allan@...el.com>,
Carolyn Wyborny <carolyn.wyborny@...el.com>,
Don Skidmore <donald.c.skidmore@...el.com>,
Greg Rose <gregory.v.rose@...el.com>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
Alex Duyck <alexander.h.duyck@...el.com>,
John Ronciak <john.ronciak@...el.com>,
e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: ppanchamukhi@...erbed.com, clala@...erbed.com,
Francis.St.Amant@...erbed.com, miles.ito@...el.com,
Jiang Wang <Jiang.Wang@...erbed.com>
Subject: [PATCH 2/2] e100: power off PHY after reset when interface is down
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 <Jiang.Wang@...erbed.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists