[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1386692379-16648-1-git-send-email-zajec5@gmail.com>
Date: Tue, 10 Dec 2013 17:19:39 +0100
From: Rafał Miłecki <zajec5@...il.com>
To: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Cc: Hauke Mehrtens <hauke@...ke-m.de>,
Rafał Miłecki <zajec5@...il.com>
Subject: [PATCH] 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@...il.com>
---
drivers/net/ethernet/broadcom/bgmac.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index db71d75..055204e 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1139,6 +1139,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:
@@ -1151,6 +1153,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);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists