net: fec: fix regression in link change accounting
authorLucas Stach <l.stach@pengutronix.de>
Tue, 16 Apr 2013 00:42:42 +0000 (00:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Apr 2013 20:47:43 +0000 (16:47 -0400)
A link-down isn't properly saved in the FEC state, so we wouldn't restart the
FEC after a repeated link-up.

Regression was introduced with commit
d97e7497 "net: fec: restart the FEC when PHY speed changes"

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.c

index f292c3aa423fbdeabb83ebdafa3b1699e988b19a..73195f643c9c3b23e45a0fac4008caa919473a25 100644 (file)
@@ -1002,6 +1002,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
        } else {
                if (fep->link) {
                        fec_stop(ndev);
+                       fep->link = phy_dev->link;
                        status_change = 1;
                }
        }