Commit 4e34da4d authored by Rafał Miłecki's avatar Rafał Miłecki Committed by David S. Miller

bgmac: start/stop PHY on netdev open/stop

I've realized that I need to call ethtool command to get Ethernet
working after booting. Ex call: ethtool -s eth0 autoneg on
It was fixing Ethernet even if auto-negotiation was already on.

Adding calls to phy_start and phy_stop look like a real solution.
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 77d47afb
......@@ -1141,6 +1141,8 @@ static int bgmac_open(struct net_device *net_dev)
}
napi_enable(&bgmac->napi);
phy_start(bgmac->phy_dev);
netif_carrier_on(net_dev);
err_out:
......@@ -1153,6 +1155,8 @@ static int bgmac_stop(struct net_device *net_dev)
netif_carrier_off(net_dev);
phy_stop(bgmac->phy_dev);
napi_disable(&bgmac->napi);
bgmac_chip_intrs_off(bgmac);
free_irq(bgmac->core->irq, net_dev);
......
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