* [net 0/4] bnx2x bug fixes patch series
@ 2012-03-12 21:22 Yuval Mintz
2012-03-12 21:22 ` [net 1/4] bnx2x: pfc statistics counts pfc events twice Yuval Mintz
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Yuval Mintz @ 2012-03-12 21:22 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz
Hello Dave,
This patch series fixes several bugs in the bnx2x driver.
Please consider applying it to 'net'.
Thanks,
Yuval
^ permalink raw reply [flat|nested] 6+ messages in thread
* [net 1/4] bnx2x: pfc statistics counts pfc events twice
2012-03-12 21:22 [net 0/4] bnx2x bug fixes patch series Yuval Mintz
@ 2012-03-12 21:22 ` Yuval Mintz
2012-03-12 21:22 ` [net 2/4] bnx2x: added cpu_to_le16 when preparing ramrod's data Yuval Mintz
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2012-03-12 21:22 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz
When pfc statistics were counted, the delta change from last count
was summed twice. This fixes the issue.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 1adef26..a766b25 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -554,23 +554,11 @@ static void bnx2x_bmac_stats_update(struct bnx2x *bp)
UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl);
/* collect PFC stats */
- DIFF_64(diff.hi, new->tx_stat_gtpp_hi,
- pstats->pfc_frames_tx_hi,
- diff.lo, new->tx_stat_gtpp_lo,
- pstats->pfc_frames_tx_lo);
pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi;
pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo;
- ADD_64(pstats->pfc_frames_tx_hi, diff.hi,
- pstats->pfc_frames_tx_lo, diff.lo);
- DIFF_64(diff.hi, new->rx_stat_grpp_hi,
- pstats->pfc_frames_rx_hi,
- diff.lo, new->rx_stat_grpp_lo,
- pstats->pfc_frames_rx_lo);
pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi;
pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo;
- ADD_64(pstats->pfc_frames_rx_hi, diff.hi,
- pstats->pfc_frames_rx_lo, diff.lo);
}
estats->pause_frames_received_hi =
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net 2/4] bnx2x: added cpu_to_le16 when preparing ramrod's data
2012-03-12 21:22 [net 0/4] bnx2x bug fixes patch series Yuval Mintz
2012-03-12 21:22 ` [net 1/4] bnx2x: pfc statistics counts pfc events twice Yuval Mintz
@ 2012-03-12 21:22 ` Yuval Mintz
2012-03-12 21:22 ` [net 3/4] bnx2x: dcb bit indices flags used as bits Yuval Mintz
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2012-03-12 21:22 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Ariel Elior, Yuval Mintz
From: Ariel Elior <ariele@broadcom.com>
Fixed endianess issue when passing arguments to FW.
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index cb6339c..94110e9 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -5601,7 +5601,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp,
/* Fill the ramrod data with provided parameters */
rdata->function_mode = cpu_to_le16(start_params->mf_mode);
- rdata->sd_vlan_tag = start_params->sd_vlan_tag;
+ rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag);
rdata->path_id = BP_PATH(bp);
rdata->network_cos_mode = start_params->network_cos_mode;
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net 3/4] bnx2x: dcb bit indices flags used as bits
2012-03-12 21:22 [net 0/4] bnx2x bug fixes patch series Yuval Mintz
2012-03-12 21:22 ` [net 1/4] bnx2x: pfc statistics counts pfc events twice Yuval Mintz
2012-03-12 21:22 ` [net 2/4] bnx2x: added cpu_to_le16 when preparing ramrod's data Yuval Mintz
@ 2012-03-12 21:22 ` Yuval Mintz
2012-03-12 21:22 ` [net 4/4] bnx2x: FCoE statistics id fixed Yuval Mintz
2012-03-13 0:01 ` [net 0/4] bnx2x bug fixes patch series David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2012-03-12 21:22 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz
DCB flags were updated using the flags' bit offsets instead of
the actual bits. This is now fixed.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 7aee469..99389c8 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -1934,7 +1934,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
}
if (bp->port.pmf)
- bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0);
+ bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
else
bnx2x__link_status_update(bp);
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
index 5051cf3..6d82ade 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
@@ -735,7 +735,9 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
bp->dcbx_error);
/* mark DCBX result for PMF migration */
- bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 1);
+ bnx2x_update_drv_flags(bp,
+ 1 << DRV_FLAGS_DCB_CONFIGURED,
+ 1);
#ifdef BCM_DCBNL
/*
* Add new app tlvs to dcbnl
@@ -1020,7 +1022,7 @@ void bnx2x_dcbx_init(struct bnx2x *bp)
DP(NETIF_MSG_LINK, "dcbx_lldp_params_offset 0x%x\n",
dcbx_lldp_params_offset);
- bnx2x_update_drv_flags(bp, DRV_FLAGS_DCB_CONFIGURED, 0);
+ bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0);
if (SHMEM_LLDP_DCBX_PARAMS_NONE != dcbx_lldp_params_offset) {
bnx2x_dcbx_admin_mib_updated_params(bp,
@@ -1857,7 +1859,7 @@ void bnx2x_dcbx_pmf_update(struct bnx2x *bp)
* read it from shmem and update bp and netdev accordingly
*/
if (SHMEM2_HAS(bp, drv_flags) &&
- GET_FLAGS(SHMEM2_RD(bp, drv_flags), DRV_FLAGS_DCB_CONFIGURED)) {
+ GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) {
/* Read neg results if dcbx is in the FW */
if (bnx2x_dcbx_read_shmem_neg_results(bp))
return;
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [net 4/4] bnx2x: FCoE statistics id fixed
2012-03-12 21:22 [net 0/4] bnx2x bug fixes patch series Yuval Mintz
` (2 preceding siblings ...)
2012-03-12 21:22 ` [net 3/4] bnx2x: dcb bit indices flags used as bits Yuval Mintz
@ 2012-03-12 21:22 ` Yuval Mintz
2012-03-13 0:01 ` [net 0/4] bnx2x bug fixes patch series David Miller
4 siblings, 0 replies; 6+ messages in thread
From: Yuval Mintz @ 2012-03-12 21:22 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, Yuval Mintz
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>
---
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 bf27c54..0f4d034 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,
*/
static inline u8 bnx2x_stats_id(struct bnx2x_fastpath *fp)
{
- if (!CHIP_IS_E1x(fp->bp))
+ struct bnx2x *bp = fp->bp;
+ if (!CHIP_IS_E1x(bp)) {
+#ifdef BCM_CNIC
+ /* there are special statistics counters for FCoE 136..140 */
+ if (IS_FCOE_FP(fp))
+ return bp->cnic_base_cl_id + (bp->pf_num >> 1);
+#endif
return fp->cl_id;
- else
- return fp->cl_id + BP_PORT(fp->bp) * FP_SB_MAX_E1x;
+ }
+ return fp->cl_id + BP_PORT(bp) * FP_SB_MAX_E1x;
}
static inline void bnx2x_init_vlan_mac_fp_objs(struct bnx2x_fastpath *fp,
--
1.7.9.rc2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [net 0/4] bnx2x bug fixes patch series
2012-03-12 21:22 [net 0/4] bnx2x bug fixes patch series Yuval Mintz
` (3 preceding siblings ...)
2012-03-12 21:22 ` [net 4/4] bnx2x: FCoE statistics id fixed Yuval Mintz
@ 2012-03-13 0:01 ` David Miller
4 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2012-03-13 0:01 UTC (permalink / raw)
To: yuvalmin; +Cc: netdev, eilong
From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Mon, 12 Mar 2012 17:22:03 -0400
> This patch series fixes several bugs in the bnx2x driver.
>
> Please consider applying it to 'net'.
All applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-13 0:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 21:22 [net 0/4] bnx2x bug fixes patch series Yuval Mintz
2012-03-12 21:22 ` [net 1/4] bnx2x: pfc statistics counts pfc events twice Yuval Mintz
2012-03-12 21:22 ` [net 2/4] bnx2x: added cpu_to_le16 when preparing ramrod's data Yuval Mintz
2012-03-12 21:22 ` [net 3/4] bnx2x: dcb bit indices flags used as bits Yuval Mintz
2012-03-12 21:22 ` [net 4/4] bnx2x: FCoE statistics id fixed Yuval Mintz
2012-03-13 0:01 ` [net 0/4] bnx2x bug fixes patch series 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).