diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2012-03-12 07:22:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-12 20:01:25 -0400 |
commit | de5c37414af10ac9305d4a3e9c1468347ca3ccaa (patch) | |
tree | c279513cfa68bb4fa7a8b67873418150834114a2 /drivers | |
parent | e695a2dda1775dafc88174d2c0d71fab18db105a (diff) |
bnx2x: FCoE statistics id fixed
FCoE statistics ids were distinguished from the L2's statistics ids.
However, not all of the change was committed. This causes a possible
collision of indices when FCoE is present.
This patch fixes the issue.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h index bf27c54ff2e0..4f40f7d7d8c6 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | |||
@@ -1179,10 +1179,16 @@ static inline int bnx2x_alloc_rx_bds(struct bnx2x_fastpath *fp, | |||
1179 | */ | 1179 | */ |
1180 | static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) | 1180 | static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp) |
1181 | { | 1181 | { |
1182 | if (!CHIP_IS_E1x(fp->bp)) | 1182 | struct bnx2x *bp = fp->bp; |
1183 | if (!CHIP_IS_E1x(bp)) { | ||
1184 | #ifdef BCM_CNIC | ||
1185 | /* there are special statistics counters for FCoE 136..140 */ | ||
1186 | if (IS_FCOE_FP(fp)) | ||
1187 | return bp->cnic_base_cl_id + (bp->pf_num >> 1); | ||
1188 | #endif | ||
1183 | return fp->cl_id; | 1189 | return fp->cl_id; |
1184 | else | 1190 | } |
1185 | return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x; | 1191 | return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x; |
1186 | } | 1192 | } |
1187 | 1193 | ||
1188 | static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, | 1194 | static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp, |