Skip to content

Commit

Permalink
r6040: invoke phy_{start,stop} when appropriate
Browse files Browse the repository at this point in the history
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: Joe Chou <Joe.Chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Oct 10, 2011
1 parent f0ec717 commit 06e92c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/rdc/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ static void r6040_down(struct net_device *dev)
iowrite16(adrp[0], ioaddr + MID_0L);
iowrite16(adrp[1], ioaddr + MID_0M);
iowrite16(adrp[2], ioaddr + MID_0H);

phy_stop(lp->phydev);
}

static int r6040_close(struct net_device *dev)
Expand Down Expand Up @@ -727,6 +729,8 @@ static int r6040_up(struct net_device *dev)
/* Initialize all MAC registers */
r6040_init_mac_regs(dev);

phy_start(lp->phydev);

return 0;
}

Expand Down

0 comments on commit 06e92c3

Please sign in to comment.