diff options
author | Petri Gynther <pgynther@google.com> | 2015-03-05 17:40:12 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-06 15:13:41 -0500 |
commit | 3feafeed16f92b96b7b67a3e30882c62c859f4bb (patch) | |
tree | 03c489e11bb19788f41e5b6761a82e7aa4d6e767 /drivers/net/ethernet/broadcom/genet/bcmgenet.c | |
parent | 7e906e025d2ccf94f23b0cf8967a52134d6be6d1 (diff) | |
download | lwn-3feafeed16f92b96b7b67a3e30882c62c859f4bb.tar.gz lwn-3feafeed16f92b96b7b67a3e30882c62c859f4bb.zip |
net: bcmgenet: adjust the call to alloc_etherdev_mqs()
In preparation for supporting multiple Rx queues, adjust the call to
alloc_etherdev_mqs() to allow max GENET_MAX_MQ_CNT + 1 Rx queues.
The actual number of Rx queues in use is correctly adjusted with:
netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmgenet.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index f56553b9f915..57271f7b2456 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -2668,8 +2668,9 @@ static int bcmgenet_probe(struct platform_device *pdev) struct resource *r; int err = -EIO; - /* Up to GENET_MAX_MQ_CNT + 1 TX queues and a single RX queue */ - dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1, 1); + /* Up to GENET_MAX_MQ_CNT + 1 TX queues and RX queues */ + dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1, + GENET_MAX_MQ_CNT + 1); if (!dev) { dev_err(&pdev->dev, "can't allocate net device\n"); return -ENOMEM; |