[v2,1/5] net: mv643xx_eth: properly start/stop phy device

Message ID 1386926429-28818-2-git-send-email-sebastian.hesselbarth@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Sebastian Hesselbarth Dec. 13, 2013, 9:20 a.m.
When using phydev, it should be phy_start/phy_stop'ed properly. This
driver doesn't do that, so add the corresponding calls to port_start/
stop respectively.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
 drivers/net/ethernet/marvell/mv643xx_eth.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 61088a6..3aa706f 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2098,6 +2098,7 @@  static void port_start(struct mv643xx_eth_private *mp)
 		mv643xx_eth_get_settings(mp->dev, &cmd);
 		mv643xx_eth_set_settings(mp->dev, &cmd);
+		phy_start(mp->phy);
@@ -2293,7 +2294,8 @@  static int mv643xx_eth_stop(struct net_device *dev)
+	if (mp->phy)
+		phy_stop(mp->phy);
 	free_irq(dev->irq, dev);