net: mv643xx_eth: properly start/stop phy device
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Fri, 13 Dec 2013 09:20:25 +0000 (10:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2013 19:42:43 +0000 (14:42 -0500)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mv643xx_eth.c

index b3d9327f78b9124cdd297fdbdb8d02bacbbbe335..a2565ce22b7c9af32d6c34ac011f468e36153296 100644 (file)
@@ -2080,6 +2080,7 @@ static void port_start(struct mv643xx_eth_private *mp)
                mv643xx_eth_get_settings(mp->dev, &cmd);
                phy_init_hw(mp->phy);
                mv643xx_eth_set_settings(mp->dev, &cmd);
+               phy_start(mp->phy);
        }
 
        /*
@@ -2275,7 +2276,8 @@ static int mv643xx_eth_stop(struct net_device *dev)
        del_timer_sync(&mp->rx_oom);
 
        netif_carrier_off(dev);
-
+       if (mp->phy)
+               phy_stop(mp->phy);
        free_irq(dev->irq, dev);
 
        port_reset(mp);