diff options
author | Rasesh Mody <rmody@brocade.com> | 2011-07-22 04:07:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-22 20:01:14 -0400 |
commit | 9b08a4fce2245748f05b43e1c03fd1676079e003 (patch) | |
tree | ace6b9ebacc5b85035eab99eafdee85aaef81e8d /drivers | |
parent | d4e16d4285d93ea0c284a3cf547e61472f79f8d2 (diff) |
bna: HW Error Counter Fix
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bna/bfa_defs.h | 1 | ||||
-rw-r--r-- | drivers/net/bna/bfa_ioc.c | 3 | ||||
-rw-r--r-- | 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 fa81f3c4b332..b080b3698f48 100644 --- a/drivers/net/bna/bfa_defs.h +++ b/drivers/net/bna/bfa_defs.h | |||
@@ -153,6 +153,7 @@ struct bfa_ioc_drv_stats { | |||
153 | u32 enable_reqs; | 153 | u32 enable_reqs; |
154 | u32 disable_replies; | 154 | u32 disable_replies; |
155 | u32 enable_replies; | 155 | u32 enable_replies; |
156 | u32 rsvd; | ||
156 | }; | 157 | }; |
157 | 158 | ||
158 | /** | 159 | /** |
diff --git a/drivers/net/bna/bfa_ioc.c b/drivers/net/bna/bfa_ioc.c index c3b62a3753f9..126b0aac9f94 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) | |||
2029 | void | 2029 | void |
2030 | bfa_nw_ioc_error_isr(struct bfa_ioc *ioc) | 2030 | bfa_nw_ioc_error_isr(struct bfa_ioc *ioc) |
2031 | { | 2031 | { |
2032 | bfa_ioc_stats(ioc, ioc_hbfails); | ||
2033 | bfa_ioc_stats_hb_count(ioc, ioc->hb_count); | ||
2032 | bfa_fsm_send_event(ioc, IOC_E_HWERROR); | 2034 | bfa_fsm_send_event(ioc, IOC_E_HWERROR); |
2033 | } | 2035 | } |
2034 | 2036 | ||
@@ -2255,6 +2257,7 @@ bfa_ioc_recover(struct bfa_ioc *ioc) | |||
2255 | { | 2257 | { |
2256 | pr_crit("Heart Beat of IOC has failed\n"); | 2258 | pr_crit("Heart Beat of IOC has failed\n"); |
2257 | bfa_ioc_stats(ioc, ioc_hbfails); | 2259 | bfa_ioc_stats(ioc, ioc_hbfails); |
2260 | bfa_ioc_stats_hb_count(ioc, ioc->hb_count); | ||
2258 | bfa_fsm_send_event(ioc, IOC_E_HBFAIL); | 2261 | bfa_fsm_send_event(ioc, IOC_E_HBFAIL); |
2259 | } | 2262 | } |
2260 | 2263 | ||
diff --git a/drivers/net/bna/bfa_ioc.h b/drivers/net/bna/bfa_ioc.h index c6cf218d9f81..4b5dc987453f 100644 --- a/drivers/net/bna/bfa_ioc.h +++ b/drivers/net/bna/bfa_ioc.h | |||
@@ -237,6 +237,8 @@ struct bfa_ioc_hwif { | |||
237 | BFI_ADAPTER_GETP(NPORTS, (__ioc)->attr->adapter_prop) | 237 | BFI_ADAPTER_GETP(NPORTS, (__ioc)->attr->adapter_prop) |
238 | 238 | ||
239 | #define bfa_ioc_stats(_ioc, _stats) ((_ioc)->stats._stats++) | 239 | #define bfa_ioc_stats(_ioc, _stats) ((_ioc)->stats._stats++) |
240 | #define bfa_ioc_stats_hb_count(_ioc, _hb_count) \ | ||
241 | ((_ioc)->stats.hb_count = (_hb_count)) | ||
240 | #define BFA_IOC_FWIMG_MINSZ (16 * 1024) | 242 | #define BFA_IOC_FWIMG_MINSZ (16 * 1024) |
241 | #define BFA_IOC_FWIMG_TYPE(__ioc) \ | 243 | #define BFA_IOC_FWIMG_TYPE(__ioc) \ |
242 | (((__ioc)->ctdev) ? \ | 244 | (((__ioc)->ctdev) ? \ |