aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2013-12-10 11:19:39 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-10 18:09:12 -0500
commit4e34da4d4252f93a7bc66017a7577afb03c3cb8e (patch)
tree8c523e0ad424fd2612595abbbdb3e1c41baed232
parent77d47afbf3c58350c3708b609005358bbd33e085 (diff)
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: Rafał Miłecki <zajec5@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 0452937227ff..fd6a22e3dd75 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1141,6 +1141,8 @@ static int bgmac_open(struct net_device *net_dev)
1141 } 1141 }
1142 napi_enable(&bgmac->napi); 1142 napi_enable(&bgmac->napi);
1143 1143
1144 phy_start(bgmac->phy_dev);
1145
1144 netif_carrier_on(net_dev); 1146 netif_carrier_on(net_dev);
1145 1147
1146err_out: 1148err_out:
@@ -1153,6 +1155,8 @@ static int bgmac_stop(struct net_device *net_dev)
1153 1155
1154 netif_carrier_off(net_dev); 1156 netif_carrier_off(net_dev);
1155 1157
1158 phy_stop(bgmac->phy_dev);
1159
1156 napi_disable(&bgmac->napi); 1160 napi_disable(&bgmac->napi);
1157 bgmac_chip_intrs_off(bgmac); 1161 bgmac_chip_intrs_off(bgmac);
1158 free_irq(bgmac->core->irq, net_dev); 1162 free_irq(bgmac->core->irq, net_dev);