Commit 9b08a4fc authored by Rasesh Mody's avatar Rasesh Mody Committed by David S. Miller

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: default avatarRasesh Mody <rmody@brocade.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4e16d42
...@@ -153,6 +153,7 @@ struct bfa_ioc_drv_stats { ...@@ -153,6 +153,7 @@ struct bfa_ioc_drv_stats {
u32 enable_reqs; u32 enable_reqs;
u32 disable_replies; u32 disable_replies;
u32 enable_replies; u32 enable_replies;
u32 rsvd;
}; };
/** /**
......
...@@ -2029,6 +2029,8 @@ bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc) ...@@ -2029,6 +2029,8 @@ bfa_nw_ioc_mbox_isr(struct bfa_ioc *ioc)
void void
bfa_nw_ioc_error_isr(struct bfa_ioc *ioc) 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); bfa_fsm_send_event(ioc, IOC_E_HWERROR);
} }
...@@ -2255,6 +2257,7 @@ bfa_ioc_recover(struct bfa_ioc *ioc) ...@@ -2255,6 +2257,7 @@ bfa_ioc_recover(struct bfa_ioc *ioc)
{ {
pr_crit("Heart Beat of IOC has failed\n"); pr_crit("Heart Beat of IOC has failed\n");
bfa_ioc_stats(ioc, ioc_hbfails); bfa_ioc_stats(ioc, ioc_hbfails);
bfa_ioc_stats_hb_count(ioc, ioc->hb_count);
bfa_fsm_send_event(ioc, IOC_E_HBFAIL); bfa_fsm_send_event(ioc, IOC_E_HBFAIL);
} }
......
...@@ -237,6 +237,8 @@ struct bfa_ioc_hwif { ...@@ -237,6 +237,8 @@ struct bfa_ioc_hwif {
BFI_ADAPTER_GETP(NPORTS, (__ioc)->attr->adapter_prop) BFI_ADAPTER_GETP(NPORTS, (__ioc)->attr->adapter_prop)
#define bfa_ioc_stats(_ioc, _stats) ((_ioc)->stats._stats++) #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_MINSZ (16 * 1024)
#define BFA_IOC_FWIMG_TYPE(__ioc) \ #define BFA_IOC_FWIMG_TYPE(__ioc) \
(((__ioc)->ctdev) ? \ (((__ioc)->ctdev) ? \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment