]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: bcmgenet: adjust the call to alloc_etherdev_mqs()
authorPetri Gynther <pgynther@google.com>
Fri, 6 Mar 2015 01:40:12 +0000 (17:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Mar 2015 20:13:41 +0000 (15:13 -0500)
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>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index f56553b9f915d553be778540c14d7812e1a5839a..57271f7b2456ddbd4277cf0604418158dded06e1 100644 (file)
@@ -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;