From: Roland Dreier Date: Mon, 12 Sep 2005 21:08:51 +0000 (-0700) Subject: [PATCH] IB/mthca: assign ACK timeout field correctly X-Git-Tag: v2.6.14-rc3~150^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bb4a7f0da75ce9f3e933880428d39b2aa1f16961;p=linux-2.6-omap-h63xx.git [PATCH] IB/mthca: assign ACK timeout field correctly The hardware reads the ACK timeout field from the most significant 5 bits of struct mthca_qp_path's ackto field, not the least significant bits. This fix has the driver put the timeout in the right place. Without this, we get a timeout that is 2^8 times too small. Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index bcef06bf15e..2c883c1fd53 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -687,7 +687,7 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask) } if (attr_mask & IB_QP_TIMEOUT) { - qp_context->pri_path.ackto = attr->timeout; + qp_context->pri_path.ackto = attr->timeout << 3; qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ACK_TIMEOUT); }