From: Atsushi Nemoto Date: Tue, 8 Sep 2015 09:15:41 +0000 (+0900) Subject: net: eth: altera: Fix the initial device operstate X-Git-Tag: v5.15~15095^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d43cefcd68bbc9a67b2c0efe38eb9cf6b5170fe8;p=platform%2Fkernel%2Flinux-starfive.git 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: Atsushi Nemoto Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index 8207877..fe64482 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -1517,6 +1517,7 @@ static int altera_tse_probe(struct platform_device *pdev) spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->rxdma_irq_lock); + netif_carrier_off(ndev); ret = register_netdev(ndev); if (ret) { dev_err(&pdev->dev, "failed to register TSE net device\n");