From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net 1/6] bnx2x: properly initialize statistic counters
Date: Tue, 16 Jul 2013 18:21:42 +0300 [thread overview]
Message-ID: <1373988107-305-2-git-send-email-dmitry@broadcom.com> (raw)
In-Reply-To: <1373988107-305-1-git-send-email-dmitry@broadcom.com>
This prevent second statistics query be sent before first one is complete.
This is required since two outstanding queries may cause FW assert.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 98366ab..69c4cb6 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -1591,10 +1591,16 @@ void bnx2x_stats_init(struct bnx2x *bp)
{
int /*abs*/port = BP_PORT(bp);
int mb_idx = BP_FW_MB_IDX(bp);
+ __le16 init_fw_counter = le16_to_cpu(0xFFFF);
+ struct stats_counter *counters = &bp->fw_stats_data->storm_counters;
bp->stats_pending = 0;
bp->executer_idx = 0;
bp->stats_counter = 0;
+ counters->xstats_counter = init_fw_counter;
+ counters->tstats_counter = init_fw_counter;
+ counters->ustats_counter = init_fw_counter;
+ counters->cstats_counter = init_fw_counter;
/* port and func stats for management */
if (!BP_NOMCP(bp)) {
--
1.8.1.4
next prev parent reply other threads:[~2013-07-16 15:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 15:21 [PATCH net 0/6] bnx2x: fixes Dmitry Kravkov
2013-07-16 15:21 ` Dmitry Kravkov [this message]
2013-07-16 16:24 ` [PATCH net 1/6] bnx2x: properly initialize statistic counters Joe Perches
2013-07-16 18:14 ` Dmitry Kravkov
2013-07-16 18:35 ` Joe Perches
2013-07-16 15:21 ` [PATCH net 2/6] bnx2x: prevent statistics update flow to act before statistics are started Dmitry Kravkov
2013-07-16 18:14 ` Sergei Shtylyov
2013-07-16 15:21 ` [PATCH net 3/6] bnx2x: update fairness parameters following DCB negotiation Dmitry Kravkov
2013-07-16 15:21 ` [PATCH net 4/6] bnx2x: fix memory leak in VF Dmitry Kravkov
2013-07-16 18:12 ` Sergei Shtylyov
2013-07-16 15:21 ` [PATCH net 5/6] bnx2x: fix PTE write access error Dmitry Kravkov
2013-07-16 15:21 ` [PATCH net 6/6] bnx2x: prevent crash in shutdown flow with CNIC Dmitry Kravkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373988107-305-2-git-send-email-dmitry@broadcom.com \
--to=dmitry@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.