Commit 9511724d authored by Joachim Fenkes's avatar Joachim Fenkes Committed by Roland Dreier

IB/ehca: Fix masking error in {,re}reg_phys_mr()

Signed-off-by: default avatarJoachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent c0c84d56
...@@ -259,7 +259,7 @@ struct ib_mr *ehca_reg_phys_mr(struct ib_pd *pd, ...@@ -259,7 +259,7 @@ struct ib_mr *ehca_reg_phys_mr(struct ib_pd *pd,
pginfo.u.phy.num_phys_buf = num_phys_buf; pginfo.u.phy.num_phys_buf = num_phys_buf;
pginfo.u.phy.phys_buf_array = phys_buf_array; pginfo.u.phy.phys_buf_array = phys_buf_array;
pginfo.next_hwpage = pginfo.next_hwpage =
((u64)iova_start & ~(hw_pgsize - 1)) / hw_pgsize; ((u64)iova_start & ~PAGE_MASK) / hw_pgsize;
ret = ehca_reg_mr(shca, e_mr, iova_start, size, mr_access_flags, ret = ehca_reg_mr(shca, e_mr, iova_start, size, mr_access_flags,
e_pd, &pginfo, &e_mr->ib.ib_mr.lkey, e_pd, &pginfo, &e_mr->ib.ib_mr.lkey,
...@@ -547,7 +547,7 @@ int ehca_rereg_phys_mr(struct ib_mr *mr, ...@@ -547,7 +547,7 @@ int ehca_rereg_phys_mr(struct ib_mr *mr,
pginfo.u.phy.num_phys_buf = num_phys_buf; pginfo.u.phy.num_phys_buf = num_phys_buf;
pginfo.u.phy.phys_buf_array = phys_buf_array; pginfo.u.phy.phys_buf_array = phys_buf_array;
pginfo.next_hwpage = pginfo.next_hwpage =
((u64)iova_start & ~(hw_pgsize - 1)) / hw_pgsize; ((u64)iova_start & ~PAGE_MASK) / hw_pgsize;
} }
if (mr_rereg_mask & IB_MR_REREG_ACCESS) if (mr_rereg_mask & IB_MR_REREG_ACCESS)
new_acl = mr_access_flags; new_acl = mr_access_flags;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment