Skip to content

Commit

Permalink
cxgb4vf: Call netif_carrier_off properly in pci_probe
Browse files Browse the repository at this point in the history
netif_carrier_off() should be called only after register_netdev().

Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arjun Vynipadath authored and David S. Miller committed Mar 2, 2019
1 parent 0960004 commit 57d37ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3136,7 +3136,6 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
* it.
*/
pi->xact_addr_filt = -1;
netif_carrier_off(netdev);
netdev->irq = pdev->irq;

netdev->hw_features = NETIF_F_SG | TSO_FLAGS | NETIF_F_GRO |
Expand Down Expand Up @@ -3259,6 +3258,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
continue;
}

netif_carrier_off(netdev);
set_bit(pidx, &adapter->registered_device_map);
}
if (adapter->registered_device_map == 0) {
Expand Down

0 comments on commit 57d37ae

Please sign in to comment.