]> git.baikalelectronics.ru Git - kernel.git/commitdiff
IB/hfi1: Use accessor to determine ring size
authorKaike Wan <kaike.wan@intel.com>
Mon, 28 Aug 2017 18:23:39 +0000 (11:23 -0700)
committerDoug Ledford <dledford@redhat.com>
Mon, 28 Aug 2017 23:12:28 +0000 (19:12 -0400)
The qp_stats print will soon be moving to rdmavt, so use the proper
accessor to get the ring size rather than a driver supplied constant.

Fixes: Commit ff8d836efe06 ("IB/hfi1: Add receiving queue info to qp_stats")
Reviewed-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/qp.c

index b87889d4e9e42e6c9ec903f40931a88679a86a9b..6daa39630dd5e9c86ef71846bfe7082e187bdf78 100644 (file)
@@ -659,7 +659,7 @@ void qp_iter_print(struct seq_file *s, struct qp_iter *iter)
                   qp->s_avail,
                   /* ack_queue ring pointers, size */
                   qp->s_tail_ack_queue, qp->r_head_ack_queue,
-                  HFI1_MAX_RDMA_ATOMIC,
+                  rvt_max_atomic(&to_idev(qp->ibqp.device)->rdi),
                   /* remote QP info  */
                   qp->remote_qpn,
                   rdma_ah_get_dlid(&qp->remote_ah_attr),