Commit 55dd2753 authored by Nimrod Andy's avatar Nimrod Andy Committed by David S. Miller

net: fec: init MAC prior to mii bus probe

Below case causes mii bus probe failed:
ifconfig eth0 down -> suspend/resume with Mega/fax mix off -> ifconfig eth0 up

In i.MX6SX/i.MX7D chip, Mega/fast mix off feature is supported that means most of
SOC power will be off including ENET MAC for power saving. Once ENET MAC power
off, all initialized MAC registers reset to default, so in the case, it must
init MAC prior to mii bus probe.
Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 42bcce87
...@@ -2856,12 +2856,14 @@ fec_enet_open(struct net_device *ndev) ...@@ -2856,12 +2856,14 @@ fec_enet_open(struct net_device *ndev)
if (ret) if (ret)
goto err_enet_alloc; goto err_enet_alloc;
/* Init MAC prior to mii bus probe */
fec_restart(ndev);
/* Probe and connect to PHY when open the interface */ /* Probe and connect to PHY when open the interface */
ret = fec_enet_mii_probe(ndev); ret = fec_enet_mii_probe(ndev);
if (ret) if (ret)
goto err_enet_mii_probe; goto err_enet_mii_probe;
fec_restart(ndev);
napi_enable(&fep->napi); napi_enable(&fep->napi);
phy_start(fep->phy_dev); phy_start(fep->phy_dev);
netif_tx_start_all_queues(ndev); netif_tx_start_all_queues(ndev);
......
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