aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_stats.c
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2011-08-29 20:08:42 -0400
committerDavid S. Miller <davem@davemloft.net>2011-09-15 14:49:29 -0400
commit3395a033a7c2f1a089fae7e89bf108764b59529c (patch)
tree7f8498c152969675f0a7d47a61869d75c037ca8c /drivers/net/bnx2x/bnx2x_stats.c
parentc2188952fc7d2ca54bb8aca1bc502618a7488baf (diff)
bnx2x: fix MF for 4-port devices
Number of VNs for 4-port devices is 2 instead of 4 Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_stats.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c
index f5d9b4213cad..9908f2bbcf73 100644
--- a/drivers/net/bnx2x/bnx2x_stats.c
+++ b/drivers/net/bnx2x/bnx2x_stats.c
@@ -1392,7 +1392,7 @@ static void bnx2x_port_stats_base_init(struct bnx2x *bp)
1392 1392
1393static void bnx2x_func_stats_base_init(struct bnx2x *bp) 1393static void bnx2x_func_stats_base_init(struct bnx2x *bp)
1394{ 1394{
1395 int vn, vn_max = IS_MF(bp) ? E1HVN_MAX : E1VN_MAX; 1395 int vn, vn_max = IS_MF(bp) ? BP_MAX_VN_NUM(bp) : E1VN_MAX;
1396 u32 func_stx; 1396 u32 func_stx;
1397 1397
1398 /* sanity */ 1398 /* sanity */
@@ -1405,7 +1405,7 @@ static void bnx2x_func_stats_base_init(struct bnx2x *bp)
1405 func_stx = bp->func_stx; 1405 func_stx = bp->func_stx;
1406 1406
1407 for (vn = VN_0; vn < vn_max; vn++) { 1407 for (vn = VN_0; vn < vn_max; vn++) {
1408 int mb_idx = CHIP_IS_E1x(bp) ? 2*vn + BP_PORT(bp) : vn; 1408 int mb_idx = BP_FW_MB_IDX_VN(bp, vn);
1409 1409
1410 bp->func_stx = SHMEM_RD(bp, func_mb[mb_idx].fw_mb_param); 1410 bp->func_stx = SHMEM_RD(bp, func_mb[mb_idx].fw_mb_param);
1411 bnx2x_func_stats_init(bp); 1411 bnx2x_func_stats_init(bp);