aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_driver.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_driver.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_driver.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index 979ae2996be8..4109913c20a7 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -460,6 +460,8 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
460 * by ipath_setup_htconfig. 460 * by ipath_setup_htconfig.
461 */ 461 */
462 dd->ipath_flags = 0; 462 dd->ipath_flags = 0;
463 dd->ipath_lli_counter = 0;
464 dd->ipath_lli_errors = 0;
463 465
464 if (dd->ipath_f_bus(dd, pdev)) 466 if (dd->ipath_f_bus(dd, pdev))
465 ipath_dev_err(dd, "Failed to setup config space; " 467 ipath_dev_err(dd, "Failed to setup config space; "
@@ -942,6 +944,18 @@ reloop:
942 "tlen=%x opcode=%x egridx=%x: %s\n", 944 "tlen=%x opcode=%x egridx=%x: %s\n",
943 eflags, l, etype, tlen, bthbytes[0], 945 eflags, l, etype, tlen, bthbytes[0],
944 ips_get_index((__le32 *) rc), emsg); 946 ips_get_index((__le32 *) rc), emsg);
947 /* Count local link integrity errors. */
948 if (eflags & (INFINIPATH_RHF_H_ICRCERR |
949 INFINIPATH_RHF_H_VCRCERR)) {
950 u8 n = (dd->ipath_ibcctrl >>
951 INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT) &
952 INFINIPATH_IBCC_PHYERRTHRESHOLD_MASK;
953
954 if (++dd->ipath_lli_counter > n) {
955 dd->ipath_lli_counter = 0;
956 dd->ipath_lli_errors++;
957 }
958 }
945 } else if (etype == RCVHQ_RCV_TYPE_NON_KD) { 959 } else if (etype == RCVHQ_RCV_TYPE_NON_KD) {
946 int ret = __ipath_verbs_rcv(dd, rc + 1, 960 int ret = __ipath_verbs_rcv(dd, rc + 1,
947 ebuf, tlen); 961 ebuf, tlen);
@@ -949,6 +963,9 @@ reloop:
949 ipath_cdbg(VERBOSE, 963 ipath_cdbg(VERBOSE,
950 "received IB packet, " 964 "received IB packet, "
951 "not SMA (QP=%x)\n", qp); 965 "not SMA (QP=%x)\n", qp);
966 if (dd->ipath_lli_counter)
967 dd->ipath_lli_counter--;
968
952 } else if (etype == RCVHQ_RCV_TYPE_EAGER) { 969 } else if (etype == RCVHQ_RCV_TYPE_EAGER) {
953 if (qp == IPATH_KD_QP && 970 if (qp == IPATH_KD_QP &&
954 bthbytes[0] == ipath_layer_rcv_opcode && 971 bthbytes[0] == ipath_layer_rcv_opcode &&