[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150908.181541.478844573.nemoto@toshiba-tops.co.jp>
Date: Tue, 8 Sep 2015 18:15:41 +0900
From: Atsushi Nemoto <nemoto@...hiba-tops.co.jp>
To: Vince Bridgers <vbridger@...nsource.altera.com>,
<netdev@...r.kernel.org>
Subject: [PATCH] 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 <nemoto@...hiba-tops.co.jp>
---
drivers/net/ethernet/altera/altera_tse_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
index 3ade46c..91fd718 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -1518,6 +1518,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");
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists