From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: eilong@broadcom.com, "Dmitry Kravkov" <dmitry@broadcom.com>,
"Ariel Elior" <ariele@broadcom.com>
Subject: [PATCH net v4 1/6] bnx2x: properly initialize statistic counters
Date: Tue, 6 Aug 2013 00:35:39 +0300 [thread overview]
Message-ID: <1375738544-8695-2-git-send-email-dmitry@broadcom.com> (raw)
In-Reply-To: <1375738544-8695-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 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index 98366ab..a22ad61 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -1589,12 +1589,17 @@ void bnx2x_memset_stats(struct bnx2x *bp)
void bnx2x_stats_init(struct bnx2x *bp)
{
- int /*abs*/port = BP_PORT(bp);
+ struct stats_counter *counters = &bp->fw_stats_data->storm_counters;
int mb_idx = BP_FW_MB_IDX(bp);
+ int port = BP_PORT(bp);
bp->stats_pending = 0;
bp->executer_idx = 0;
bp->stats_counter = 0;
+ counters->xstats_counter = cpu_to_le16(0xFFFF);
+ counters->tstats_counter = cpu_to_le16(0xFFFF);
+ counters->ustats_counter = cpu_to_le16(0xFFFF);
+ counters->cstats_counter = cpu_to_le16(0xFFFF);
/* port and func stats for management */
if (!BP_NOMCP(bp)) {
--
1.8.1.4
next prev parent reply other threads:[~2013-08-05 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 21:35 [PATCH net v4 0/6] bnx2x: fixes Dmitry Kravkov
2013-08-05 21:35 ` Dmitry Kravkov [this message]
2013-08-12 20:08 ` [PATCH net v4 1/6] bnx2x: properly initialize statistic counters Benjamin Poirier
2013-08-12 22:48 ` Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 2/6] bnx2x: protect different statistics flows Dmitry Kravkov
2013-08-05 23:26 ` David Miller
2013-08-05 21:35 ` [PATCH net v4 3/6] bnx2x: update fairness parameters following DCB negotiation Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 4/6] bnx2x: fix memory leak in VF Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 5/6] bnx2x: fix PTE write access error Dmitry Kravkov
2013-08-05 21:35 ` [PATCH net v4 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=1375738544-8695-2-git-send-email-dmitry@broadcom.com \
--to=dmitry@broadcom.com \
--cc=ariele@broadcom.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--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.