瀏覽代碼

bnx2x: Use netif_set_real_num_{rx,tx}_queues()

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings 14 年之前
父節點
當前提交
31b600b5fc
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      drivers/net/bnx2x/bnx2x_cmn.c

+ 4 - 2
drivers/net/bnx2x/bnx2x_cmn.c

@@ -1207,8 +1207,8 @@ static int bnx2x_set_num_queues(struct bnx2x *bp)
 			bp->num_queues = 1;
 			bp->num_queues = 1;
 		break;
 		break;
 	}
 	}
-	bp->dev->real_num_tx_queues = bp->num_queues;
-	return rc;
+	netif_set_real_num_tx_queues(bp->dev, bp->num_queues);
+	return netif_set_real_num_rx_queues(bp->dev, bp->num_queues);
 }
 }
 
 
 static void bnx2x_release_firmware(struct bnx2x *bp)
 static void bnx2x_release_firmware(struct bnx2x *bp)
@@ -1240,6 +1240,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
 	bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;
 	bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;
 
 
 	rc = bnx2x_set_num_queues(bp);
 	rc = bnx2x_set_num_queues(bp);
+	if (rc)
+		return rc;
 
 
 	if (bnx2x_alloc_mem(bp)) {
 	if (bnx2x_alloc_mem(bp)) {
 		bnx2x_free_irq(bp, true);
 		bnx2x_free_irq(bp, true);