From: Vitja Makarov Date: Wed, 30 Jan 2008 08:52:26 +0000 (+0800) Subject: EMAC driver: add power down mode X-Git-Tag: v2.6.25-rc1~1065^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=136492b275e0dd02d842b94507d66267d18d341c;p=linux-2.6 EMAC driver: add power down mode 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 Signed-off-by: Bryan Wu Signed-off-by: Jeff Garzik Signed-off-by: David S. Miller --- diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index e9bd059167..f2368b71a7 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);