aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_layer.c
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2006-07-01 07:36:09 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 12:56:01 -0400
commitfba75200ad92892bf32d8d6f1443c6f1e4f48676 (patch)
tree289d5db3b7fc9f9ce4c49f9f1299bbf3985b87d4 /drivers/infiniband/hw/ipath/ipath_layer.c
parent85322947d761d08bd84165500f35b93c702aaaf3 (diff)
[PATCH] IB/ipath: fixes to performance get counters for IB compliance
This patch fixes some problems uncovered during IB compliance testing to return the right values for error counters returned by the Performance Get Counters packet. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Cc: "Michael S. Tsirkin" <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_layer.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_layer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c
index 0f8b5290ff19..6e3d9bf3354f 100644
--- a/drivers/infiniband/hw/ipath/ipath_layer.c
+++ b/drivers/infiniband/hw/ipath/ipath_layer.c
@@ -1032,19 +1032,22 @@ int ipath_layer_get_counters(struct ipath_devdata *dd,
1032 ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt); 1032 ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt);
1033 cntrs->link_error_recovery_counter = 1033 cntrs->link_error_recovery_counter =
1034 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt); 1034 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt);
1035 /*
1036 * The link downed counter counts when the other side downs the
1037 * connection. We add in the number of times we downed the link
1038 * due to local link integrity errors to compensate.
1039 */
1035 cntrs->link_downed_counter = 1040 cntrs->link_downed_counter =
1036 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt); 1041 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt);
1037 cntrs->port_rcv_errors = 1042 cntrs->port_rcv_errors =
1038 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) + 1043 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) +
1039 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) + 1044 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) +
1040 ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) + 1045 ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) +
1041 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errrcvflowctrlcnt) +
1042 ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) + 1046 ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) +
1043 ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) + 1047 ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) +
1044 ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) + 1048 ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) +
1045 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) + 1049 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) +
1046 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) + 1050 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) +
1047 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlinkcnt) +
1048 ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt); 1051 ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt);
1049 cntrs->port_rcv_remphys_errors = 1052 cntrs->port_rcv_remphys_errors =
1050 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt); 1053 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt);
@@ -1058,6 +1061,8 @@ int ipath_layer_get_counters(struct ipath_devdata *dd,
1058 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt); 1061 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt);
1059 cntrs->port_rcv_packets = 1062 cntrs->port_rcv_packets =
1060 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt); 1063 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt);
1064 cntrs->local_link_integrity_errors = dd->ipath_lli_errors;
1065 cntrs->excessive_buffer_overrun_errors = 0; /* XXX */
1061 1066
1062 ret = 0; 1067 ret = 0;
1063 1068