Commit 3feafeed authored by Petri Gynther's avatar Petri Gynther Committed by David S. Miller

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: default avatarPetri Gynther <pgynther@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e906e02
...@@ -2668,8 +2668,9 @@ static int bcmgenet_probe(struct platform_device *pdev) ...@@ -2668,8 +2668,9 @@ static int bcmgenet_probe(struct platform_device *pdev)
struct resource *r; struct resource *r;
int err = -EIO; int err = -EIO;
/* Up to GENET_MAX_MQ_CNT + 1 TX queues and a single RX queue */ /* Up to GENET_MAX_MQ_CNT + 1 TX queues and RX queues */
dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1, 1); dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1,
GENET_MAX_MQ_CNT + 1);
if (!dev) { if (!dev) {
dev_err(&pdev->dev, "can't allocate net device\n"); dev_err(&pdev->dev, "can't allocate net device\n");
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment