From: Rasesh Mody <rmody@brocade.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <adapter_linux_open_src_team@brocade.com>,
Rasesh Mody <rmody@brocade.com>
Subject: [PATCH 09/10] bna: HW Error Counter Fix
Date: Fri, 22 Jul 2011 11:07:48 -0700 [thread overview]
Message-ID: <1311358069-32067-10-git-send-email-rmody@brocade.com> (raw)
In-Reply-To: <1311358069-32067-1-git-send-email-rmody@brocade.com>
Change details:
- Heartbeat failure counter is not incrementing under some scenarios.
Update hbfails and hb_count stats during hwerror event.
Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
drivers/net/bna/bfa_defs.h | 1 +
drivers/net/bna/bfa_ioc.c | 3 +++
drivers/net/bna/bfa_ioc.h | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bna/bfa_defs.h b/drivers/net/bna/bfa_defs.h
index fa81f3c..b080b36 100644
--- a/drivers/net/bna/bfa_defs.h
+++ b/drivers/net/bna/bfa_defs.h
@@ -153,6 +153,7 @@ struct bfa_ioc_drv_stats {
u32 enable_reqs;
u32 disable_replies;
u32 enable_replies;
+ u32 rsvd;
};
/**
diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c
index c3b62a3..126b0aa 100644
--- a/drivers/net/bna/bfa_ioc.c
+++ b/drivers/net/bna/bfa_ioc.c
@@ -2029,6 +2029,8 @@ bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc)
void
bfa_nw_ioc_error_isr(struct bfa_ioc *ioc)
{
+ bfa_ioc_stats(ioc, ioc_hbfails);
+ bfa_ioc_stats_hb_count(ioc, ioc->hb_count);
bfa_fsm_send_event(ioc, IOC_E_HWERROR);
}
@@ -2255,6 +2257,7 @@ bfa_ioc_recover(struct bfa_ioc *ioc)
{
pr_crit("Heart Beat of IOC has failed\n");
bfa_ioc_stats(ioc, ioc_hbfails);
+ bfa_ioc_stats_hb_count(ioc, ioc->hb_count);
bfa_fsm_send_event(ioc, IOC_E_HBFAIL);
}
diff --git a/drivers/net/bna/bfa_ioc.h b/drivers/net/bna/bfa_ioc.h
index c6cf218..4b5dc98 100644
--- a/drivers/net/bna/bfa_ioc.h
+++ b/drivers/net/bna/bfa_ioc.h
@@ -237,6 +237,8 @@ struct bfa_ioc_hwif {
BFI_ADAPTER_GETP(NPORTS, (__ioc)->attr->adapter_prop)
#define bfa_ioc_stats(_ioc, _stats) ((_ioc)->stats._stats++)
+#define bfa_ioc_stats_hb_count(_ioc, _hb_count) \
+ ((_ioc)->stats.hb_count = (_hb_count))
#define BFA_IOC_FWIMG_MINSZ (16 * 1024)
#define BFA_IOC_FWIMG_TYPE(__ioc) \
(((__ioc)->ctdev) ? \
--
1.7.1
next prev parent reply other threads:[~2011-07-22 18:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 18:07 [PATCH 00/10] bna: driver fixes and cleanup Rasesh Mody
2011-07-22 18:07 ` [PATCH 01/10] bna: Print Driver Version Rasesh Mody
2011-07-22 18:07 ` [PATCH 02/10] bna: CheckPatch Cleanup Rasesh Mody
2011-07-22 18:07 ` [PATCH 03/10] bna: IOC Event Notification Enhancement Rasesh Mody
2011-07-22 18:07 ` [PATCH 04/10] bna: State Machine Fault Handling Cleanup Rasesh Mody
2011-07-22 18:07 ` [PATCH 05/10] bna: Minor IRQ Index and Definition Change Rasesh Mody
2011-07-22 18:07 ` [PATCH 06/10] bna: Mboxq Flush When IOC Disabled Rasesh Mody
2011-07-22 18:07 ` [PATCH 07/10] bna: IOC Event Name Change Rasesh Mody
2011-07-22 18:07 ` [PATCH 08/10] bna: Add HW Semaphore Unlock Logic Rasesh Mody
2011-07-22 18:07 ` Rasesh Mody [this message]
2011-07-22 18:07 ` [PATCH 10/10] bna: Header File Consolidation Rasesh Mody
2011-07-23 0:15 ` [PATCH 00/10] bna: driver fixes and cleanup David Miller
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=1311358069-32067-10-git-send-email-rmody@brocade.com \
--to=rmody@brocade.com \
--cc=adapter_linux_open_src_team@brocade.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 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).