netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bnx2x: remove false warning regarding interrupt number
@ 2012-09-20 15:26 Ariel Elior
  2012-09-21 17:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ariel Elior @ 2012-09-20 15:26 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Eilon Greenstein, Ariel Elior

Since version 7.4 the FW configures in the pci config space the max
number of interrupts available to the physical function, instead of
the exact number to use.
This causes a false warning in driver when comparing the number of
configured interrupts to the number about to be used.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 211753e..0875ecf 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -9831,12 +9831,13 @@ static void __devinit bnx2x_get_igu_cam_info(struct bnx2x *bp)
 	}
 
 #ifdef CONFIG_PCI_MSI
-	/*
-	 * It's expected that number of CAM entries for this functions is equal
-	 * to the number evaluated based on the MSI-X table size. We want a
-	 * harsh warning if these values are different!
+	/* Due to new PF resource allocation by MFW T7.4 and above, it's
+	 * optional that number of CAM entries will not be equal to the value
+	 * advertised in PCI.
+	 * Driver should use the minimal value of both as the actual status
+	 * block count
 	 */
-	WARN_ON(bp->igu_sb_cnt != igu_sb_cnt);
+	bp->igu_sb_cnt = min_t(int, bp->igu_sb_cnt, igu_sb_cnt);
 #endif
 
 	if (igu_sb_cnt == 0)
-- 
1.7.9.GIT

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] bnx2x: remove false warning regarding interrupt number
  2012-09-20 15:26 [PATCH net] bnx2x: remove false warning regarding interrupt number Ariel Elior
@ 2012-09-21 17:27 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-09-21 17:27 UTC (permalink / raw)
  To: ariele; +Cc: netdev, eilong

From: "Ariel Elior" <ariele@broadcom.com>
Date: Thu, 20 Sep 2012 18:26:41 +0300

> Since version 7.4 the FW configures in the pci config space the max
> number of interrupts available to the physical function, instead of
> the exact number to use.
> This causes a false warning in driver when comparing the number of
> configured interrupts to the number about to be used.
> 
> Signed-off-by: Ariel Elior <ariele@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-21 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-20 15:26 [PATCH net] bnx2x: remove false warning regarding interrupt number Ariel Elior
2012-09-21 17:27 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).