From 131ae652ac32ee8bc5a3cdf0f4c5dafc912cab23 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Wed, 28 Dec 2011 07:43:11 +0100 Subject: fec_mxc: move autonegoatiate restart after mii_postcall Allow boards to change what is advertised before an autoneg restart happens Signed-off-by: Troy Kisky --- drivers/net/fec_mxc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 4105f6c52..bca4a4b53 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -207,12 +207,13 @@ static int miiphy_restart_aneg(struct eth_device *dev) fec_mdio_write(eth, fec->phy_id, MII_ADVERTISE, LPA_100FULL | LPA_100HALF | LPA_10FULL | LPA_10HALF | PHY_ANLPAR_PSB_802_3); - fec_mdio_write(eth, fec->phy_id, MII_BMCR, - BMCR_ANENABLE | BMCR_ANRESTART); if (fec->mii_postcall) ret = fec->mii_postcall(fec->phy_id); + fec_mdio_write(eth, fec->phy_id, MII_BMCR, + BMCR_ANENABLE | BMCR_ANRESTART); + return ret; } -- cgit v1.2.3