From: Vladimir Sokolovsky Date: Thu, 9 Oct 2008 03:09:01 +0000 (-0700) Subject: IB/mlx4: Set RLKEY bit for kernel QPs X-Git-Tag: v2.6.28-rc1~727^2^8 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=d57f5f72df1b0da501c4b55e56a1040b1631c1f3 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 Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 9559248..baa01de 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