]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net: fec: reset fep link status in suspend function
authorNimrod Andy <B38611@freescale.com>
Thu, 11 Dec 2014 01:20:31 +0000 (09:20 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:18:40 +0000 (21:18 -0600)
commit77ade296c8f701440873d17c404ec38d65983358
tree3d3733bf50c1d57f4af1e6457cbe5ac630774906
parent28f7911019870a728cb1c1b92aabfd5e1f2f3a6b
net: fec: reset fep link status in suspend function

On some i.MX6 serial boards, phy power and refrence clock are supplied
or controlled by SOC. When do suspend/resume test, the power and clock
are disabled, so phy device link down.

For current driver, fep->link is still up status, which cause extra operation
like below code. To avoid the dumy operation, we set fep->link to down when
phy device is real down.
...
if (fep->link) {
napi_disable(&fep->napi);
netif_tx_lock_bh(ndev);
fec_stop(ndev);
netif_tx_unlock_bh(ndev);
napi_enable(&fep->napi);
fep->link = phy_dev->link;
status_change = 1;
}
...

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c