Skip to content

Commit

Permalink
cxgb4vf: Set number of queues in pci probe only
Browse files Browse the repository at this point in the history
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hariprasad Shenai authored and David S. Miller committed Mar 10, 2016
1 parent 28f71c6 commit a8d16d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,6 @@ static int cxgb4vf_open(struct net_device *dev)
/*
* Note that this interface is up and start everything up ...
*/
netif_set_real_num_tx_queues(dev, pi->nqsets);
err = netif_set_real_num_rx_queues(dev, pi->nqsets);
if (err)
goto err_unwind;
err = link_start(dev);
if (err)
goto err_unwind;
Expand Down Expand Up @@ -2831,10 +2827,14 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
* must register at least one net device.
*/
for_each_port(adapter, pidx) {
struct port_info *pi = netdev_priv(adapter->port[pidx]);
netdev = adapter->port[pidx];
if (netdev == NULL)
continue;

netif_set_real_num_tx_queues(netdev, pi->nqsets);
netif_set_real_num_rx_queues(netdev, pi->nqsets);

err = register_netdev(netdev);
if (err) {
dev_warn(&pdev->dev, "cannot register net device %s,"
Expand Down

0 comments on commit a8d16d0

Please sign in to comment.