net: mvpp2: move the mii configuration in the ndo_open path
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Tue, 22 Aug 2017 17:08:23 +0000 (19:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Aug 2017 21:32:19 +0000 (14:32 -0700)
This moves the mii configuration in the ndo_open path, to allow handling
different mii configurations later and to switch between these
configurations at runtime.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Tested-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c

index 03b7ced1082f1555103f3939bb2df4716b69371c..087eb793ab4d02191697d6d001e3b67dc553fb7e 100644 (file)
@@ -5987,6 +5987,7 @@ static void mvpp2_start_dev(struct mvpp2_port *port)
        /* Enable interrupts on all CPUs */
        mvpp2_interrupts_enable(port);
 
+       mvpp2_port_mii_set(port);
        mvpp2_port_enable(port);
        phy_start(ndev->phydev);
        netif_tx_start_all_queues(port->dev);
@@ -6949,7 +6950,6 @@ static int mvpp2_port_probe(struct platform_device *pdev,
                goto err_free_stats;
        }
 
-       mvpp2_port_mii_set(port);
        mvpp2_port_periodic_xon_disable(port);
 
        if (priv->hw_version == MVPP21)