From: Kaike Wan Date: Mon, 28 Aug 2017 18:23:39 +0000 (-0700) Subject: IB/hfi1: Use accessor to determine ring size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b9796b0a6fbb6e4678002b3f09392192502fd14;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git IB/hfi1: Use accessor to determine ring size 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 Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- diff --git a/drivers/infiniband/hw/hfi1/qp.c b/drivers/infiniband/hw/hfi1/qp.c index b87889d4e9e4..6daa39630dd5 100644 --- a/drivers/infiniband/hw/hfi1/qp.c +++ b/drivers/infiniband/hw/hfi1/qp.c @@ -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),