[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1201683148-23931-7-git-send-email-bryan.wu@analog.com>
Date: Wed, 30 Jan 2008 16:52:26 +0800
From: Bryan Wu <bryan.wu@...log.com>
To: jeff@...zik.org, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Vitja Makarov <vitja.makarov@...il.com>,
Bryan Wu <bryan.wu@...log.com>
Subject: [PATCH 6/8] [Blackfin] EMAC driver: add power down mode
From: Vitja Makarov <vitja.makarov@...il.com>
This patch puts phy in power-down mode when interface is down.
Also we should think about energy detect power-down mode, that will
decrease power consumption when no link.
Signed-off-by: Vitja Makarov <vitja.makarov@...il.com>
Signed-off-by: Bryan Wu <bryan.wu@...log.com>
---
drivers/net/bfin_mac.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index e9bd059..f2368b7 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -884,10 +884,10 @@ static int bf537mac_open(struct net_device *dev)
return retval;
phy_start(lp->phydev);
+ phy_write(lp->phydev, MII_BMCR, BMCR_RESET);
setup_system_regs(dev);
bf537mac_disable();
bf537mac_enable();
-
pr_debug("hardware init finished\n");
netif_start_queue(dev);
netif_carrier_on(dev);
@@ -910,6 +910,7 @@ static int bf537mac_close(struct net_device *dev)
netif_carrier_off(dev);
phy_stop(lp->phydev);
+ phy_write(lp->phydev, MII_BMCR, BMCR_PDOWN);
/* clear everything */
bf537mac_shutdown(dev);
--
1.5.3.4
--
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