summaryrefslogtreecommitdiff
path: root/sys/dev/mthca
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-24 22:22:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-24 22:40:13 +0000
commit5ae3710aeb2a984344fbe36de71612fc1a3d1a71 (patch)
treee746602e440cc6fdc7e91058f45aaa33352dab4a /sys/dev/mthca
parent3a0b2432828e9014bfea064baefd0dd051fc3cd6 (diff)
Diffstat (limited to 'sys/dev/mthca')
-rw-r--r--sys/dev/mthca/mthca_cmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/mthca/mthca_cmd.c b/sys/dev/mthca/mthca_cmd.c
index 8dcce01c061a..6924348e72e4 100644
--- a/sys/dev/mthca/mthca_cmd.c
+++ b/sys/dev/mthca/mthca_cmd.c
@@ -659,7 +659,9 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm,
int nent = 0;
int i;
int err = 0;
- int ts __unused = 0, tc = 0;
+#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
+ int ts = 0, tc = 0;
+#endif /* CONFIG_INFINIBAND_MTHCA_DEBUG */
mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);
if (IS_ERR(mailbox))
@@ -693,8 +695,10 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm,
pages[nent * 2 + 1] =
cpu_to_be64((mthca_icm_addr(&iter) + (i << lg)) |
(lg - MTHCA_ICM_PAGE_SHIFT));
+#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
ts += 1 << (lg - 10);
++tc;
+#endif /* CONFIG_INFINIBAND_MTHCA_DEBUG */
if (++nent == MTHCA_MAILBOX_SIZE / 16) {
err = mthca_cmd(dev, mailbox->dma, nent, 0, op,