RDMA/hns: Fix wrong parameters when initial mtt of srq->idx_que
authorWeihang Li <liweihang@hisilicon.com>
Wed, 4 Sep 2019 03:14:42 +0000 (11:14 +0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 21 Oct 2019 19:29:37 +0000 (15:29 -0400)
commite8a07de57ea4ca7c2d604871c52826e66899fc70
treea32ee8b5a5966e1597d007df9dec881f0b9072af
parent9f7d7064009c37cb26eee4a83302cf077fe180d6
RDMA/hns: Fix wrong parameters when initial mtt of srq->idx_que

The parameters npages used to initial mtt of srq->idx_que shouldn't be
same with srq's. And page_shift should be calculated from idx_buf_pg_sz.
This patch fixes above issues and use field named npage and page_shift
in hns_roce_buf instead of two temporary variables to let us use them
anywhere.

Fixes: 18df508c7970 ("RDMA/hns: Remove if-else judgment statements for creating srq")
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Link: https://lore.kernel.org/r/1567566885-23088-3-git-send-email-liweihang@hisilicon.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_srq.c