From: "Yuval Mintz" <yuvalmin@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: "Yuval Mintz" <yuvalmin@broadcom.com>,
"Eilon Greenstein" <eilong@broadcom.com>
Subject: [net PATCH v2 2/7] bnx2x: fix stats copying logic
Date: Tue, 11 Sep 2012 17:34:09 +0300 [thread overview]
Message-ID: <1347374054-16730-3-git-send-email-yuvalmin@broadcom.com> (raw)
In-Reply-To: <1347374054-16730-1-git-send-email-yuvalmin@broadcom.com>
FW needs the driver statistics for management. Current logic is broken
in that the function that gathers the port statistics does not copy
its own statistics to a place where the FW can use it.
This patch causes every function that can pass statistics to the FW to
do so.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
index d848dc9..a1d0446 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
@@ -101,6 +101,11 @@ static void bnx2x_hw_stats_post(struct bnx2x *bp)
if (CHIP_REV_IS_SLOW(bp))
return;
+ /* Update MCP's statistics if possible */
+ if (bp->func_stx)
+ memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats,
+ sizeof(bp->func_stats));
+
/* loader */
if (bp->executer_idx) {
int loader_idx = PMF_DMAE_C(bp);
@@ -128,8 +133,6 @@ static void bnx2x_hw_stats_post(struct bnx2x *bp)
} else if (bp->func_stx) {
*stats_comp = 0;
- memcpy(bnx2x_sp(bp, func_stats), &bp->func_stats,
- sizeof(bp->func_stats));
bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp));
}
}
--
1.7.9.rc2
next prev parent reply other threads:[~2012-09-11 14:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-11 14:34 [net PATCH v2 0/7] bnx2x: bug fixes for net Yuval Mintz
2012-09-11 14:34 ` [net PATCH v2 1/7] bnx2x: Avoid sending multiple statistics queries Yuval Mintz
2012-09-13 20:17 ` David Miller
2012-09-13 20:34 ` Yuval Mintz
2012-09-13 20:38 ` David Miller
2012-09-13 20:35 ` Dmitry Kravkov
2012-09-11 14:34 ` Yuval Mintz [this message]
2012-09-11 14:34 ` [net PATCH v2 3/7] bnx2x: prevent timeouts when using PFC Yuval Mintz
2012-09-11 14:34 ` [net PATCH v2 4/7] bnx2x: display the correct duplex value Yuval Mintz
2012-09-11 14:34 ` [net PATCH v2 5/7] bnx2x: correct advertisement of pause capabilities Yuval Mintz
2012-09-11 14:34 ` [net PATCH v2 6/7] bnx2x: fix registers dumped Yuval Mintz
2012-09-11 14:34 ` [net PATCH v2 7/7] bnx2x: Add missing afex code Yuval Mintz
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=1347374054-16730-3-git-send-email-yuvalmin@broadcom.com \
--to=yuvalmin@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 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).