Skip to content

Commit a8d16d0

Browse files
Hariprasad Shenaidavem330
authored andcommitted
cxgb4vf: Set number of queues in pci probe only
Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 28f71c6 commit a8d16d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,6 @@ static int cxgb4vf_open(struct net_device *dev)
790790
/*
791791
* Note that this interface is up and start everything up ...
792792
*/
793-
netif_set_real_num_tx_queues(dev, pi->nqsets);
794-
err = netif_set_real_num_rx_queues(dev, pi->nqsets);
795-
if (err)
796-
goto err_unwind;
797793
err = link_start(dev);
798794
if (err)
799795
goto err_unwind;
@@ -2831,10 +2827,14 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
28312827
* must register at least one net device.
28322828
*/
28332829
for_each_port(adapter, pidx) {
2830+
struct port_info *pi = netdev_priv(adapter->port[pidx]);
28342831
netdev = adapter->port[pidx];
28352832
if (netdev == NULL)
28362833
continue;
28372834

2835+
netif_set_real_num_tx_queues(netdev, pi->nqsets);
2836+
netif_set_real_num_rx_queues(netdev, pi->nqsets);
2837+
28382838
err = register_netdev(netdev);
28392839
if (err) {
28402840
dev_warn(&pdev->dev, "cannot register net device %s,"

0 commit comments

Comments
 (0)