aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bfin_mac.c
diff options
context:
space:
mode:
authorVitja Makarov <vitja.makarov@gmail.com>2008-01-30 03:52:26 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-03 07:28:50 -0500
commit136492b275e0dd02d842b94507d66267d18d341c (patch)
tree6c821b0105721afc61d862109bfe1b5bdb9884cd /drivers/net/bfin_mac.c
parent6893ff1c7eeac73e2c3267e4270bdb64ec427a31 (diff)
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 <vitja.makarov@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bfin_mac.c')
-rw-r--r--drivers/net/bfin_mac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index e9bd05916774..f2368b71a720 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)
884 return retval; 884 return retval;
885 885
886 phy_start(lp->phydev); 886 phy_start(lp->phydev);
887 phy_write(lp->phydev, MII_BMCR, BMCR_RESET);
887 setup_system_regs(dev); 888 setup_system_regs(dev);
888 bf537mac_disable(); 889 bf537mac_disable();
889 bf537mac_enable(); 890 bf537mac_enable();
890
891 pr_debug("hardware init finished\n"); 891 pr_debug("hardware init finished\n");
892 netif_start_queue(dev); 892 netif_start_queue(dev);
893 netif_carrier_on(dev); 893 netif_carrier_on(dev);
@@ -910,6 +910,7 @@ static int bf537mac_close(struct net_device *dev)
910 netif_carrier_off(dev); 910 netif_carrier_off(dev);
911 911
912 phy_stop(lp->phydev); 912 phy_stop(lp->phydev);
913 phy_write(lp->phydev, MII_BMCR, BMCR_PDOWN);
913 914
914 /* clear everything */ 915 /* clear everything */
915 bf537mac_shutdown(dev); 916 bf537mac_shutdown(dev);