cxgb4: keep carrier off before registering netdev

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>
This commit is contained in:
Surendra Mobiya 2017-05-30 11:32:06 +05:30 committed by David S. Miller
parent 9711164d03
commit b1a73af910
1 changed files with 2 additions and 0 deletions

View 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;