Commit 06e92c33 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

r6040: invoke phy_{start,stop} when appropriate

Joe reported to me that right after a bring up of a r6040 interface
the ethtool output had no consistent output with respect to link duplex
and speed. Fix this by adding a missing phy_start call in r6040_up and
conversely a phy_stop call in r6040_down to properly initialize phy states.
Reported-by: default avatarJoe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0ec7177
...@@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev) ...@@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
iowrite16(adrp[0], ioaddr + MID_0L); iowrite16(adrp[0], ioaddr + MID_0L);
iowrite16(adrp[1], ioaddr + MID_0M); iowrite16(adrp[1], ioaddr + MID_0M);
iowrite16(adrp[2], ioaddr + MID_0H); iowrite16(adrp[2], ioaddr + MID_0H);
phy_stop(lp->phydev);
} }
static int r6040_close(struct net_device *dev) static int r6040_close(struct net_device *dev)
...@@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev) ...@@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
/* Initialize all MAC registers */ /* Initialize all MAC registers */
r6040_init_mac_regs(dev); r6040_init_mac_regs(dev);
phy_start(lp->phydev);
return 0; return 0;
} }
......
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