[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340118848-30978-13-git-send-email-yuvalmin@broadcom.com>
Date: Tue, 19 Jun 2012 18:14:06 +0300
From: "Yuval Mintz" <yuvalmin@...adcom.com>
To: netdev@...r.kernel.org, davem@...emloft.net
cc: eilong@...adcom.com, "Yuval Mintz" <yuvalmin@...adcom.com>,
"Matt Carlson" <mcarlson@...adcom.com>
Subject: [RFC net-next 12/14] Fix broadcom/tg3
Signed-off-by: Yuval Mintz <yuvalmin@...adcom.com>
Signed-off-by: Eilon Greenstein <eilong@...adcom.com>
Cc: Matt Carlson <mcarlson@...adcom.com>
---
drivers/net/ethernet/broadcom/tg3.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index e47ff8b..d431f17 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -9908,7 +9908,8 @@ static bool tg3_enable_msix(struct tg3 *tp)
int i, rc;
struct msix_entry msix_ent[tp->irq_max];
- tp->irq_cnt = num_online_cpus();
+ tp->irq_cnt = min_t(unsigned, num_online_cpus(),
+ DEFAULT_MAX_NUM_RSS_QUEUES);
if (tp->irq_cnt > 1) {
/* We want as many rx rings enabled as there are cpus.
* In multiqueue MSI-X mode, the first MSI-X vector
@@ -10967,7 +10968,8 @@ static int tg3_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
if (netif_running(tp->dev))
info->data = tp->irq_cnt;
else {
- info->data = num_online_cpus();
+ info->data = min_t(u32, num_online_cpus(),
+ DEFAULT_MAX_NUM_RSS_QUEUES);
if (info->data > TG3_IRQ_MAX_VECS_RSS)
info->data = TG3_IRQ_MAX_VECS_RSS;
}
--
1.7.9.rc2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists