summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVladimir Sokolovsky <vlad@mellanox.co.il>2008-10-09 05:09:01 +0200
committerRoland Dreier <rolandd@cisco.com>2008-10-09 05:09:01 +0200
commitd57f5f72df1b0da501c4b55e56a1040b1631c1f3 (patch)
treef383afb1c188425fe93b6acfb788a0ef14420246 /drivers
parentMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 (diff)
downloadlinux-d57f5f72df1b0da501c4b55e56a1040b1631c1f3.tar.xz
linux-d57f5f72df1b0da501c4b55e56a1040b1631c1f3.zip
IB/mlx4: Set RLKEY bit for kernel QPs
Set RLKEY bit in the HW context for kernel QPs so that kernel QPs can use the reserved L_Key for memory reference. Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 9559248f265b..baa01deb2436 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1058,6 +1058,9 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
else
sqd_event = 0;
+ if (!ibqp->uobject && cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT)
+ context->rlkey |= (1 << 4);
+
/*
* Before passing a kernel QP to the HW, make sure that the
* ownership bits of the send queue are set and the SQ