Commit a5fe3616 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by David S. Miller

mv643xx_eth: move a couple of init actions from ->open() to port probe

Move the netif_carrier_off() call in ->open() to port probe, so that
ethtool doesn't report the link as being up before we have up'd the
interface.

Move initialisation of the rx/tx coalescing timers from ->open() to
port probe, so that we don't reset the coalescing timers every time
the interface is up'd.
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea8a8642
...@@ -2388,13 +2388,8 @@ static int mv643xx_eth_open(struct net_device *dev) ...@@ -2388,13 +2388,8 @@ static int mv643xx_eth_open(struct net_device *dev)
} }
} }
netif_carrier_off(dev);
port_start(mp); port_start(mp);
set_rx_coal(mp, 0);
set_tx_coal(mp, 0);
wrlp(mp, INT_MASK_EXT, INT_EXT_LINK_PHY | INT_EXT_TX); wrlp(mp, INT_MASK_EXT, INT_EXT_LINK_PHY | INT_EXT_TX);
wrlp(mp, INT_MASK, INT_TX_END | INT_RX | INT_EXT); wrlp(mp, INT_MASK, INT_TX_END | INT_RX | INT_EXT);
...@@ -2960,6 +2955,11 @@ static int mv643xx_eth_probe(struct platform_device *pdev) ...@@ -2960,6 +2955,11 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
if (mp->shared->win_protect) if (mp->shared->win_protect)
wrl(mp, WINDOW_PROTECT(mp->port_num), mp->shared->win_protect); wrl(mp, WINDOW_PROTECT(mp->port_num), mp->shared->win_protect);
netif_carrier_off(dev);
set_rx_coal(mp, 0);
set_tx_coal(mp, 0);
err = register_netdev(dev); err = register_netdev(dev);
if (err) if (err)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment