Commit d43cefcd authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by David S. Miller

net: eth: altera: Fix the initial device operstate

Call netif_carrier_off() prior to register_netdev(), otherwise
userspace can see incorrect link state.
Signed-off-by: default avatarAtsushi Nemoto <nemoto@toshiba-tops.co.jp>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7845989c
...@@ -1517,6 +1517,7 @@ static int altera_tse_probe(struct platform_device *pdev) ...@@ -1517,6 +1517,7 @@ static int altera_tse_probe(struct platform_device *pdev)
spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->tx_lock);
spin_lock_init(&priv->rxdma_irq_lock); spin_lock_init(&priv->rxdma_irq_lock);
netif_carrier_off(ndev);
ret = register_netdev(ndev); ret = register_netdev(ndev);
if (ret) { if (ret) {
dev_err(&pdev->dev, "failed to register TSE net device\n"); dev_err(&pdev->dev, "failed to register TSE net device\n");
......
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