aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_provider.c
diff options
context:
space:
mode:
authorArthur Kepner <akepner@sgi.com>2008-04-29 04:00:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:12 -0400
commitcb9fbc5c37b69ac584e61d449cfd590f5ae1f90d (patch)
tree3079752ba33535a21db08bed1390aca9136fadfe /drivers/infiniband/hw/mthca/mthca_provider.c
parent309df0c503c35fbb5a09537fcbb1f4967b9ca489 (diff)
IB: expand ib_umem_get() prototype
Add a new parameter, dmasync, to the ib_umem_get() prototype. Use dmasync = 1 when mapping user-allocated CQs with ib_umem_get(). Signed-off-by: Arthur Kepner <akepner@sgi.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Jes Sorensen <jes@sgi.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Roland Dreier <rdreier@cisco.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: David Miller <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 696e1f302332..2a9f460cf061 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -1006,17 +1006,23 @@ static struct ib_mr *mthca_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
1006 struct mthca_dev *dev = to_mdev(pd->device); 1006 struct mthca_dev *dev = to_mdev(pd->device);
1007 struct ib_umem_chunk *chunk; 1007 struct ib_umem_chunk *chunk;
1008 struct mthca_mr *mr; 1008 struct mthca_mr *mr;
1009 struct mthca_reg_mr ucmd;
1009 u64 *pages; 1010 u64 *pages;
1010 int shift, n, len; 1011 int shift, n, len;
1011 int i, j, k; 1012 int i, j, k;
1012 int err = 0; 1013 int err = 0;
1013 int write_mtt_size; 1014 int write_mtt_size;
1014 1015
1016 if (ib_copy_from_udata(&ucmd, udata, sizeof ucmd))
1017 return ERR_PTR(-EFAULT);
1018
1015 mr = kmalloc(sizeof *mr, GFP_KERNEL); 1019 mr = kmalloc(sizeof *mr, GFP_KERNEL);
1016 if (!mr) 1020 if (!mr)
1017 return ERR_PTR(-ENOMEM); 1021 return ERR_PTR(-ENOMEM);
1018 1022
1019 mr->umem = ib_umem_get(pd->uobject->context, start, length, acc); 1023 mr->umem = ib_umem_get(pd->uobject->context, start, length, acc,
1024 ucmd.mr_attrs & MTHCA_MR_DMASYNC);
1025
1020 if (IS_ERR(mr->umem)) { 1026 if (IS_ERR(mr->umem)) {
1021 err = PTR_ERR(mr->umem); 1027 err = PTR_ERR(mr->umem);
1022 goto err; 1028 goto err;