diff options
author | Henry Orosco <henry.orosco@intel.com> | 2016-11-09 22:33:32 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-05 16:09:37 -0500 |
commit | e67791858e7b8d1389833386cb2dd0ca30d06862 (patch) | |
tree | 79c669f8ebb082eadf94761beba5700e09440e96 | |
parent | 1ad19f739f494eda2f8e9611ab6c3056244b70fc (diff) |
i40iw: Use actual page size
In i40iw_post_send, use the actual page size instead of
encoded page size. This is to be consistent with the
rest of the file.
Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: Henry Orosco <henry.orosco@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_verbs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index d20ee118f366..dcf08b8994ec 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c | |||
@@ -2145,7 +2145,6 @@ static int i40iw_post_send(struct ib_qp *ibqp, | |||
2145 | case IB_WR_REG_MR: | 2145 | case IB_WR_REG_MR: |
2146 | { | 2146 | { |
2147 | struct i40iw_mr *iwmr = to_iwmr(reg_wr(ib_wr)->mr); | 2147 | struct i40iw_mr *iwmr = to_iwmr(reg_wr(ib_wr)->mr); |
2148 | int page_shift = ilog2(reg_wr(ib_wr)->mr->page_size); | ||
2149 | int flags = reg_wr(ib_wr)->access; | 2148 | int flags = reg_wr(ib_wr)->access; |
2150 | struct i40iw_pble_alloc *palloc = &iwmr->iwpbl.pble_alloc; | 2149 | struct i40iw_pble_alloc *palloc = &iwmr->iwpbl.pble_alloc; |
2151 | struct i40iw_sc_dev *dev = &iwqp->iwdev->sc_dev; | 2150 | struct i40iw_sc_dev *dev = &iwqp->iwdev->sc_dev; |
@@ -2156,6 +2155,7 @@ static int i40iw_post_send(struct ib_qp *ibqp, | |||
2156 | info.access_rights |= i40iw_get_user_access(flags); | 2155 | info.access_rights |= i40iw_get_user_access(flags); |
2157 | info.stag_key = reg_wr(ib_wr)->key & 0xff; | 2156 | info.stag_key = reg_wr(ib_wr)->key & 0xff; |
2158 | info.stag_idx = reg_wr(ib_wr)->key >> 8; | 2157 | info.stag_idx = reg_wr(ib_wr)->key >> 8; |
2158 | info.page_size = reg_wr(ib_wr)->mr->page_size; | ||
2159 | info.wr_id = ib_wr->wr_id; | 2159 | info.wr_id = ib_wr->wr_id; |
2160 | 2160 | ||
2161 | info.addr_type = I40IW_ADDR_TYPE_VA_BASED; | 2161 | info.addr_type = I40IW_ADDR_TYPE_VA_BASED; |
@@ -2169,9 +2169,6 @@ static int i40iw_post_send(struct ib_qp *ibqp, | |||
2169 | if (iwmr->npages > I40IW_MIN_PAGES_PER_FMR) | 2169 | if (iwmr->npages > I40IW_MIN_PAGES_PER_FMR) |
2170 | info.chunk_size = 1; | 2170 | info.chunk_size = 1; |
2171 | 2171 | ||
2172 | if (page_shift == 21) | ||
2173 | info.page_size = 1; /* 2M page */ | ||
2174 | |||
2175 | ret = dev->iw_priv_qp_ops->iw_mr_fast_register(&iwqp->sc_qp, &info, true); | 2172 | ret = dev->iw_priv_qp_ops->iw_mr_fast_register(&iwqp->sc_qp, &info, true); |
2176 | if (ret) | 2173 | if (ret) |
2177 | err = -ENOMEM; | 2174 | err = -ENOMEM; |