cxgb4: keep carrier off before registering netdev
authorSurendra Mobiya <surendra@chelsio.com>
Tue, 30 May 2017 06:02:06 +0000 (11:32 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 18:10:11 +0000 (14:10 -0400)
Mark carrier off before registering netdev to ensure that vlan device
picks up the correct state of the carrier

Signed-off-by: Surendra Mobiya <surendra@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

index 2ae54d54aea8ff9ec0cdb85015e92f31d42e07bd..06c3414c93b10e044a59688da83f848bbc31606c 100644 (file)
@@ -4956,6 +4956,8 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                netif_set_real_num_tx_queues(adapter->port[i], pi->nqsets);
                netif_set_real_num_rx_queues(adapter->port[i], pi->nqsets);
 
+               netif_carrier_off(adapter->port[i]);
+
                err = register_netdev(adapter->port[i]);
                if (err)
                        break;