Commit 136492b2 authored by Vitja Makarov's avatar Vitja Makarov Committed by David S. Miller

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: default avatarVitja Makarov <vitja.makarov@gmail.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6893ff1c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment