aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-09-28 01:11:51 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-28 01:11:51 -0400
commit2ddaad397c47de012dfb956b0c05540da1a0dde5 (patch)
tree1ea16a2a066c83b486fe5e0ba047ef7b70aa0312
parent5df8dbd7e517b581e0b8cbd72a99da17914a20b0 (diff)
tg3: 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>
-rw-r--r--drivers/net/tg3.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index fdb438dca9b..54fff5bb6f9 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8821,7 +8821,12 @@ static bool tg3_enable_msix(struct tg3 *tp)
8821 for (i = 0; i < tp->irq_max; i++) 8821 for (i = 0; i < tp->irq_max; i++)
8822 tp->napi[i].irq_vec = msix_ent[i].vector; 8822 tp->napi[i].irq_vec = msix_ent[i].vector;
8823 8823
8824 tp->dev->real_num_tx_queues = 1; 8824 netif_set_real_num_tx_queues(tp->dev, 1);
8825 rc = tp->irq_cnt > 1 ? tp->irq_cnt - 1 : 1;
8826 if (netif_set_real_num_rx_queues(tp->dev, rc)) {
8827 pci_disable_msix(tp->pdev);
8828 return false;
8829 }
8825 if (tp->irq_cnt > 1) 8830 if (tp->irq_cnt > 1)
8826 tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS; 8831 tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS;
8827 8832
@@ -8856,7 +8861,7 @@ defcfg:
8856 if (!(tp->tg3_flags2 & TG3_FLG2_USING_MSIX)) { 8861 if (!(tp->tg3_flags2 & TG3_FLG2_USING_MSIX)) {
8857 tp->irq_cnt = 1; 8862 tp->irq_cnt = 1;
8858 tp->napi[0].irq_vec = tp->pdev->irq; 8863 tp->napi[0].irq_vec = tp->pdev->irq;
8859 tp->dev->real_num_tx_queues = 1; 8864 netif_set_real_num_tx_queues(tp->dev, 1);
8860 } 8865 }
8861} 8866}
8862 8867