netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: eth: altera: Fix the initial device operstate
@ 2015-09-08  9:15 Atsushi Nemoto
  2015-09-09 19:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Atsushi Nemoto @ 2015-09-08  9:15 UTC (permalink / raw)
  To: Vince Bridgers, netdev

Call netif_carrier_off() prior to register_netdev(), otherwise
userspace can see incorrect link state.

Signed-off-by: Atsushi Nemoto <nemoto@toshiba-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");
-- 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: eth: altera: Fix the initial device operstate
  2015-09-08  9:15 [PATCH] net: eth: altera: Fix the initial device operstate Atsushi Nemoto
@ 2015-09-09 19:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-09-09 19:10 UTC (permalink / raw)
  To: nemoto; +Cc: vbridger, netdev

From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Tue, 8 Sep 2015 18:15:41 +0900

> Call netif_carrier_off() prior to register_netdev(), otherwise
> userspace can see incorrect link state.
> 
> Signed-off-by: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-09 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-08  9:15 [PATCH] net: eth: altera: Fix the initial device operstate Atsushi Nemoto
2015-09-09 19:10 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).