summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_stats.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-12-05 11:13:19 -0800
committerRoland Dreier <rolandd@cisco.com>2008-12-05 11:13:19 -0800
commit60e845035a066e81af1a29047530088d59150d8b (patch)
treeb824466835b3d6cf1c8489544094b025d1142f4a /drivers/infiniband/hw/ipath/ipath_stats.c
parent890fccb2427d53b48ab9d009fd87d55bcb173f62 (diff)
downloadblackbird-op-linux-60e845035a066e81af1a29047530088d59150d8b.tar.gz
blackbird-op-linux-60e845035a066e81af1a29047530088d59150d8b.zip
IB/ipath: Don't count IB symbol and link errors unless link is UP
Implement the ignoring of ibsymbol errors and linkrecover errors while the link is at less than INIT (long needed), to get accurate counts. Particularly an issue when doing non-IBTA DDR negotiation with chips from vendors that do not support IBTA mode negotiation. If the driver is unloaded, and there is a delta, the adjusted counters are written back to the chip, so they stay adjusted across driver reload. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_stats.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_stats.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c
index c8e3d65f0de8..f63e143e3292 100644
--- a/drivers/infiniband/hw/ipath/ipath_stats.c
+++ b/drivers/infiniband/hw/ipath/ipath_stats.c
@@ -112,6 +112,14 @@ u64 ipath_snap_cntr(struct ipath_devdata *dd, ipath_creg creg)
dd->ipath_lastrpkts = val;
}
val64 = dd->ipath_rpkts;
+ } else if (creg == dd->ipath_cregs->cr_ibsymbolerrcnt) {
+ if (dd->ibdeltainprog)
+ val64 -= val64 - dd->ibsymsnap;
+ val64 -= dd->ibsymdelta;
+ } else if (creg == dd->ipath_cregs->cr_iblinkerrrecovcnt) {
+ if (dd->ibdeltainprog)
+ val64 -= val64 - dd->iblnkerrsnap;
+ val64 -= dd->iblnkerrdelta;
} else
val64 = (u64) val;
OpenPOWER on IntegriCloud