[PATCH] net: eth: altera: Fix the initial device operstate

Subsystems: altera triple speed ethernet driver, networking drivers, the rest

STALE4062d

2 messages, 2 authors, 2015-09-09 · open the first message on its own page

[PATCH] net: eth: altera: Fix the initial device operstate

From: Atsushi Nemoto <hidden>
Date: 2015-09-08 09:16:35

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

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

Re: [PATCH] net: eth: altera: Fix the initial device operstate

From: David Miller <davem@davemloft.net>
Date: 2015-09-09 19:10:35

From: Atsushi Nemoto <redacted>
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 <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help