[ofa-general] [PATCH] IB/mlx4: Initialize DS field for stamping
Eli Cohen
eli at dev.mellanox.co.il
Mon Jun 2 03:37:38 PDT 2008
>From fe01c4c153fb3126a8c21a5297da581d1fb711e6 Mon Sep 17 00:00:00 2001
From: Eli Cohen <eli at mellanox.co.il>
Date: Mon, 2 Jun 2008 11:09:30 +0300
Subject: [PATCH] IB/mlx4: Initialize DS field for stamping
When modifying a QP to from reset to init, make sure the DS field
is initialized to the max descriptor size so that the subsequent
stamping will be made on the entire descriptor area.
Signed-off-by: Eli Cohen <eli at mellanox.co.il>
---
drivers/infiniband/hw/mlx4/qp.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index cb2f456..c61c3e9 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1065,6 +1065,8 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
for (i = 0; i < qp->sq.wqe_cnt; ++i) {
ctrl = get_send_wqe(qp, i);
ctrl->owner_opcode = cpu_to_be32(1 << 31);
+ if (qp->sq_max_wqes_per_wr < 2)
+ ctrl->fence_size = 1 << (qp->sq.wqe_shift - 4);
stamp_send_wqe(qp, i, 1 << qp->sq.wqe_shift);
}
--
1.5.5.1
More information about the general
mailing list